Skip to content

Commit

Permalink
Fix compiler warning.
Browse files Browse the repository at this point in the history
Reported by Myriachan.
  • Loading branch information
Mike Pall committed Jun 2, 2023
1 parent c7db825 commit 8c20c3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/host/buildvm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ void emit_lib(BuildCtx *ctx)
char *p;
/* Simplistic pre-processor. Only handles top-level #if/#endif. */
if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') {
int ok = 1, len = strlen(buf);
int ok = 1;
size_t len = strlen(buf);
if (buf[len-1] == '\n') {
buf[len-1] = 0;
if (buf[len-2] == '\r') {
Expand Down

0 comments on commit 8c20c3b

Please sign in to comment.