Skip to content

Commit 92ebd32

Browse files
committed
COMMON: fix const bug
1 parent e935a2f commit 92ebd32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/blib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
* LET v[(x)] = any
2424
* CONST v[(x)] = any
2525
*/
26-
void cmd_let(int allowConst) {
26+
void cmd_let(int is_const) {
2727
var_t *v_left = code_getvarptr();
2828

2929
if (!prog_error) {
30-
if (v_left->const_flag && !allowConst) {
30+
if (v_left->const_flag) {
3131
err_const();
3232
return;
3333
}
@@ -46,7 +46,7 @@ void cmd_let(int allowConst) {
4646
eval(&v_right);
4747
if (!prog_error) {
4848
v_set(v_left, &v_right);
49-
v_left->const_flag = allowConst;
49+
v_left->const_flag = is_const;
5050
}
5151
v_free(&v_right);
5252
}

0 commit comments

Comments
 (0)