From f796df783c8cc76a64b5b3b95150e69839b61e65 Mon Sep 17 00:00:00 2001 From: Flavio Medeiros Date: Thu, 24 Dec 2015 12:42:34 -0300 Subject: [PATCH] Avoiding directives that split up parts of statements. --- compiler/libpc300/sc1.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/libpc300/sc1.c b/compiler/libpc300/sc1.c index fdaa1633..daea73a5 100755 --- a/compiler/libpc300/sc1.c +++ b/compiler/libpc300/sc1.c @@ -413,16 +413,17 @@ static void inst_binary_name(char *binfname) size_t i, len; char *binptr; char newpath[512], newname[512]; + int slashchar; binptr = NULL; len = strlen(binfname); for (i = len - 1; i < len; i--) { - if (binfname[i] == '/' + slashchar = binfname[i] == '/'; #if defined WIN32 || defined _WIN32 - || binfname[i] == '\\' + slashchar = slashchar || binfname[i] == '\\'; #endif - ) + if (slashchar) { binptr = &binfname[i + 1]; break;