aboutsummaryrefslogtreecommitdiff
path: root/asm/preprocesser.cpp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-04-16 15:40:00 +0630
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-04-16 15:40:00 +0630
commit3fc1f081343b146405496f1f0ddf5b41d2fce18a (patch)
tree8c0a8daf2917c014b24f4dd3a2fe3ed910b04d8e /asm/preprocesser.cpp
parent4b3e9b356758e133028eea278d7cb4d06c0e4d11 (diff)
downloadovm-3fc1f081343b146405496f1f0ddf5b41d2fce18a.tar.gz
ovm-3fc1f081343b146405496f1f0ddf5b41d2fce18a.tar.bz2
ovm-3fc1f081343b146405496f1f0ddf5b41d2fce18a.zip
Fix bug where CONST table didn't actually store symbol names
Pretty simple fix, stupid error in hindsight.
Diffstat (limited to 'asm/preprocesser.cpp')
-rw-r--r--asm/preprocesser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/asm/preprocesser.cpp b/asm/preprocesser.cpp
index 6ea6d45..f5e31e4 100644
--- a/asm/preprocesser.cpp
+++ b/asm/preprocesser.cpp
@@ -85,7 +85,9 @@ pp_err_t preprocess_const_blocks(const vector<token_t *> &tokens,
{
string_view capture;
if (i + 1 >= tokens.size() || tokens[i + 1]->type != token_type_t::SYMBOL)
- capture = tokens[++i]->content;
+ return pp_err_type_t::EXPECTED_NAME;
+
+ capture = tokens[++i]->content;
++i;
size_t block_start = i, block_end = 0;