rsc/source/rscpp/cpp2.c | 2 +- rsc/source/rscpp/cpp3.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit cb643b44ca9469b9bbea97c5c0c0c911fc8ba058 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Mar 22 21:55:48 2017 +0100 Fix passing plain char into ctype.h is* functions Change-Id: Ifa1098a12a9d3d28a4d272ac8f4ab72d9a92282b diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index 2cbc90d9d439..e55dc384018f 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -166,7 +166,7 @@ int control(int counter) * We subtract 1 as we want the number of the next line. */ line = atoi(work) - 1; /* Reset line number */ - for (tp = work; isdigit(*tp) || type[(int)*tp] == SPA; tp++) + for (tp = work; isdigit((unsigned char)*tp) || type[(int)*tp] == SPA; tp++) ; /* Skip over digits */ if (*tp != EOS) /* Got a filename, so: */ { diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index bd2e2cc262d2..078be477d815 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -174,7 +174,7 @@ int dooptions(int argc, char** argv) else { c = *ap++; /* Option byte */ - if (islower(c)) /* Normalize case */ + if (islower((unsigned char)c)) /* Normalize case */ c = toupper(c); switch (c) /* Command character */ { @@ -224,13 +224,13 @@ int dooptions(int argc, char** argv) } while (sizp->bits != endtest && *ap != EOS) { - if (!isdigit(*ap)) /* Skip to next digit */ + if (!isdigit((unsigned char)*ap)) /* Skip to next digit */ { ap++; continue; } size = 0; /* Compile the value */ - while (isdigit(*ap)) + while (isdigit((unsigned char)*ap)) { size *= 10; size += (*ap++ - '0'); @@ -254,7 +254,7 @@ int dooptions(int argc, char** argv) #if OSL_DEBUG_LEVEL > 1 case 'X': /* Debug */ - debug = (isdigit(*ap)) ? atoi(ap) : 1; + debug = (isdigit((unsigned char)*ap)) ? atoi(ap) : 1; #if (HOST == SYS_UNIX) signal(SIGINT, (void (*)(int)) abort); /* Trap "interrupt" */ #endif _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits