summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse.c b/src/parse.c
index f8749ac..b7596d4 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -82,7 +82,7 @@ symset_t* parse_symbols(char** str, int* sLine) {
symbolSet->count = 0;
while (1) {
/* clear whitespace */
- while (!isalnum(**str) && **str != '"' && **str != '-' && **str != '(' && **str != ')' && **str != '\0') {
+ while (!isalnum((unsigned char)**str) && **str != '"' && **str != '-' && **str != '(' && **str != ')' && **str != '\0') {
/* increment line counter if newline read */
if (**str == '\n') {
(*sLine)++;
@@ -126,7 +126,7 @@ symset_t* parse_symbols(char** str, int* sLine) {
isFloat = 1;
}
/* we've hit a character that cannot be part of the symbol. parse the prior characters as the symbol name */
- else if (!isalnum(**str) && **str != '-' && **str != '(') {
+ else if (!isalnum((unsigned char)**str) && **str != '-' && **str != '(') {
/* move the pointer back, because the close paren is needed to return the calling function */
if (**str == ')') {
(*str)--;
@@ -134,7 +134,7 @@ symset_t* parse_symbols(char** str, int* sLine) {
(*str)++;
symbolName[i] = '\0';
sym_t* symbol;
- if (isalpha(symbolName[0])) {
+ if (isalpha((unsigned int)symbolName[0])) {
/* reference */
symbol = init_sym_key(symbolName);
}