embryo_cc - fix symbol write
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 1 Sep 2014 10:30:16 +0000 (19:30 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 1 Sep 2014 10:40:47 +0000 (19:40 +0900)
this fixes an actual bug coverity found in embryo_cc

fix CID 1039650

src/bin/embryo/embryo_cc_sc6.c

index a6b299d..ccf8abf 100644 (file)
@@ -371,7 +371,7 @@ do_symbol(FILE * fbin, char *params, cell opcode)
    int                 len;
    unsigned char       mclass, type;
 
-   for (endptr = params; !sc_isspace(*endptr) && endptr != '\0'; endptr++)
+   for (endptr = params; (!sc_isspace(*endptr)) && (*endptr != '\0'); endptr++)
       /* nothing */ ;
    assert(*endptr == ' ');