diff options
Diffstat (limited to '')
-rw-r--r-- | src/buildvm_fold.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buildvm_fold.c b/src/buildvm_fold.c index 33a117d7..b43d2c48 100644 --- a/src/buildvm_fold.c +++ b/src/buildvm_fold.c | |||
@@ -111,13 +111,15 @@ static uint32_t nexttoken(char **pp, int allowlit, int allowany) | |||
111 | if (!strcmp(ircall_names[i], p+7)) | 111 | if (!strcmp(ircall_names[i], p+7)) |
112 | return i; | 112 | return i; |
113 | } else if (allowlit && !strncmp(p, "IRCONV_", 7)) { | 113 | } else if (allowlit && !strncmp(p, "IRCONV_", 7)) { |
114 | for (i = 0; irt_names[i]; i++) | 114 | for (i = 0; irt_names[i]; i++) { |
115 | if (!strncmp(irt_names[i], p+7, 3) && p[10] == '_') { | 115 | const char *r = strchr(p+7, '_'); |
116 | if (r && !strncmp(irt_names[i], p+7, r-(p+7))) { | ||
116 | uint32_t j; | 117 | uint32_t j; |
117 | for (j = 0; irt_names[j]; j++) | 118 | for (j = 0; irt_names[j]; j++) |
118 | if (!strncmp(irt_names[j], p+11, 3)) | 119 | if (!strcmp(irt_names[j], r+1)) |
119 | return (i << 5) + j; | 120 | return (i << 5) + j; |
120 | } | 121 | } |
122 | } | ||
121 | } else if (allowlit && *p >= '0' && *p <= '9') { | 123 | } else if (allowlit && *p >= '0' && *p <= '9') { |
122 | for (i = 0; *p >= '0' && *p <= '9'; p++) | 124 | for (i = 0; *p >= '0' && *p <= '9'; p++) |
123 | i = i*10 + (*p - '0'); | 125 | i = i*10 + (*p - '0'); |