diff options
author | midipix <writeonce@midipix.org> | 2016-04-19 20:44:02 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2016-04-19 20:44:02 -0400 |
commit | f7d68756a5a99137ab5ae95425b35bae8256aaa5 (patch) | |
tree | 9c8376943a32393338f78713a609324f06e12adb /src/logic | |
parent | a87fd1bc7ba0cfaf0e6368724a849a05d99e3533 (diff) | |
download | slibtool-f7d68756a5a99137ab5ae95425b35bae8256aaa5.tar.bz2 slibtool-f7d68756a5a99137ab5ae95425b35bae8256aaa5.tar.xz |
execution context: avoid '\0' when assigning a value to a character type.
Diffstat (limited to 'src/logic')
-rw-r--r-- | src/logic/slbt_exec_ctx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/logic/slbt_exec_ctx.c b/src/logic/slbt_exec_ctx.c index e4145bc..754ea4b 100644 --- a/src/logic/slbt_exec_ctx.c +++ b/src/logic/slbt_exec_ctx.c @@ -192,13 +192,13 @@ int slbt_get_exec_ctx( if (ref && (dctx->cctx->mode == SLBT_MODE_COMPILE)) { if ((ch[-4] == '.') && (ch[-3] == 'l') && (ch[-2] == 'o')) { ch[-3] = 'o'; - ch[-2] = '\0'; + ch[-2] = 0; ch--; } else if (ictx->ctx.csrc) { if ((mark = strrchr(ictx->ctx.lbasename,'.'))) { ch = mark; *++ch = 'o'; - *++ch = '\0'; + *++ch = 0; ch++; } } @@ -212,7 +212,7 @@ int slbt_get_exec_ctx( for (; *ch; ch++) if (*ch == ',') { - *ch++ = '\0'; + *ch++ = 0; ictx->ctx.argv[i++] = ch; } } else { |