diff options
-rw-r--r-- | src/host/buildvm_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/host/buildvm_lib.c b/src/host/buildvm_lib.c index 47195fd4..99b8ad3f 100644 --- a/src/host/buildvm_lib.c +++ b/src/host/buildvm_lib.c | |||
@@ -319,7 +319,8 @@ void emit_lib(BuildCtx *ctx) | |||
319 | char *p; | 319 | char *p; |
320 | /* Simplistic pre-processor. Only handles top-level #if/#endif. */ | 320 | /* Simplistic pre-processor. Only handles top-level #if/#endif. */ |
321 | if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') { | 321 | if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') { |
322 | int ok = 1, len = strlen(buf); | 322 | int ok = 1; |
323 | size_t len = strlen(buf); | ||
323 | if (buf[len-1] == '\n') { | 324 | if (buf[len-1] == '\n') { |
324 | buf[len-1] = 0; | 325 | buf[len-1] = 0; |
325 | if (buf[len-2] == '\r') { | 326 | if (buf[len-2] == '\r') { |