diff options
| author | gingerBill <bill@gingerbill.org> | 2019-11-02 10:57:42 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-11-02 10:57:42 +0000 |
| commit | dbdbbcd60f1273e246d11696476ac4772f91c258 (patch) | |
| tree | 2491e48211f66a17b8b0579e6f463510147b6ce0 /src/checker.cpp | |
| parent | f9aaff99c6d2a2c2866a54f0b59b0cc2c47a9eaf (diff) | |
Fix range in statement bug caused by incorrectly assigned addressing mode #461
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 4490caa69..8ba45a799 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1033,7 +1033,9 @@ void add_type_and_value(CheckerInfo *i, Ast *expr, AddressingMode mode, Type *ty expr->tav.mode = mode; expr->tav.type = type; - expr->tav.value = value; + if (mode == Addressing_Constant || mode == Addressing_Invalid) { + expr->tav.value = value; + } } void add_entity_definition(CheckerInfo *i, Ast *identifier, Entity *entity) { |