From 14e6c291fd3cc155389168a6b9b18dcfc327bc6d Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Thu, 6 Sep 2018 04:45:10 +0200 Subject: [PATCH] Fix simplification on one --- package-lock.json | 10 +++++----- package.json | 4 ++-- src/lcalgebra.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 47b41a5..99f895e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "jaz", - "version": "0.0.1", + "name": "circom", + "version": "0.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1470,9 +1470,9 @@ } }, "zksnark": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/zksnark/-/zksnark-0.0.1.tgz", - "integrity": "sha512-DppjGsfSwcd4M0tBP3DsxnUcWjLsvyXSQWm1Pexpcxdu6J7mgFjrMPskC/NgkOUBJda1Eyd4RKKm752nP69Njg==", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/zksnark/-/zksnark-0.0.2.tgz", + "integrity": "sha512-+MYducXidMTCRRuxSLLNXBEQRIzi8nA7us2jDzlf8d+yySFRymK56z7tQUics97nl1+AoGH40GhtNlWgTFBbig==", "dev": true, "requires": { "big-integer": "^1.6.34", diff --git a/package.json b/package.json index 0956ad6..c1e38ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "circom", - "version": "0.0.2", + "version": "0.0.3", "description": "Language to generate logica circuits", "main": "index.js", "directories": { @@ -37,6 +37,6 @@ "eslint": "^5.0.1", "eslint-plugin-mocha": "^5.0.0", "jison": "^0.4.18", - "zksnark": "0.0.2" + "zksnark": "0.0.3" } } diff --git a/src/lcalgebra.js b/src/lcalgebra.js index 5ed169a..8f8cc53 100644 --- a/src/lcalgebra.js +++ b/src/lcalgebra.js @@ -437,7 +437,7 @@ function canonize(ctx, a) { for (let k in a.values) { let s = k; while (ctx.signals[s].equivalence) s= ctx.signals[s].equivalence; - if (typeof(ctx.signals[s].value) != "undefined") { + if ((typeof(ctx.signals[s].value) != "undefined")&&(k != "one")) { const v = a.values[k].times(ctx.signals[s].value).mod(__P__); if (!a.values["one"]) { a.values["one"]=v;