ref: d51345637841a13a1351bc409588ea5d001d0f8d
parent: f64b04a4e2ac9d56180b28d93e5ad58f87360243
author: cancel <cancel@cancel.fm>
date: Tue Dec 4 06:41:36 EST 2018
Fix incorrectly overlapping storage for V var names
--- a/sim.c
+++ b/sim.c
@@ -798,7 +798,7 @@
if (left >= 'A' && left <= 'Z') {
var_idx = (Usz)('Z' - left);
} else if (left >= 'a' && left <= 'z') {
- var_idx = (Usz)('z' - left);
+ var_idx = (Usz)(('Z' - 'A') + ('z' - left) + 1);
} else {
return;
}
@@ -820,7 +820,7 @@
if (right >= 'A' && right <= 'Z') {
var_idx = (Usz)('Z' - right);
} else if (right >= 'a' && right <= 'z') {
- var_idx = (Usz)('z' - right);
+ var_idx = (Usz)(('Z' - 'A') + ('z' - right) + 1);
} else {
return;
}