summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-11-26 13:09:26 +0100
committerjmoenig <jens@moenig.org>2013-11-26 13:09:26 +0100
commitd3c735fadef2e74d9050bc7933fa884300f4d57c (patch)
treea3cd5257024ae589deff0b22378d3cd7ee4c91c7
parent1b05a11f14d6df63566c25494ff0389f0448d1f2 (diff)
downloadsnap-yow-d3c735fadef2e74d9050bc7933fa884300f4d57c.tar.gz
snap-yow-d3c735fadef2e74d9050bc7933fa884300f4d57c.zip
fixed #249 - preserve variable value types with edge cases
(empty string, Boolean false)
-rwxr-xr-xhistory.txt3
-rw-r--r--threads.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/history.txt b/history.txt
index abe22be..7a02a86 100755
--- a/history.txt
+++ b/history.txt
@@ -2015,4 +2015,5 @@ ______
* Localization and Portuguese translation updates, thanks, Manuel!
* Catalan translation update, thanks, Bernat!!
* Threads: Text comparisons are now case-sensitive („fixes“ #175)
-* Threads: fixed # 179 - don’t identify primitive (static) C-Slots as implicit formal parameters
+* Threads: fixed #179 - don’t identify primitive (static) C-Slots as implicit formal parameters
+* Threads: fixed #249 - preserve variable value types with edge cases (empty string, Boolean false)
diff --git a/threads.js b/threads.js
index 2259850..3ff7a50 100644
--- a/threads.js
+++ b/threads.js
@@ -2954,7 +2954,9 @@ VariableFrame.prototype.getVar = function (name, upvars) {
};
VariableFrame.prototype.addVar = function (name, value) {
- this.vars[name] = (value === 0 ? 0 : value || null);
+ this.vars[name] = (value === 0 ? 0
+ : value === false ? false
+ : value === '' ? '' : value || null);
};
VariableFrame.prototype.deleteVar = function (name) {