about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mapScore.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mapScore.c b/mapScore.c
index 9c40795..1135c2b 100644
--- a/mapScore.c
+++ b/mapScore.c
@@ -20,7 +20,7 @@ void makeMap(FILE *f) {
 			map[c][1] = y;
 			map[c][2] = 1;
 			c = toupper(c);
-			if (map[toupper(c)][2] == 0) goto explicit_label;
+			if (c < 256 && map[c][2] == 0) goto explicit_label;
 			break;
 		}
 	}
@@ -33,8 +33,8 @@ int scoreWord(char *word, int (*fun)(int*,int*)) {
 	for (c++;*c;c++) {
 		if (*c == '\n') break;
 		// pass over ignore unset chars.
-		if(map[(unsigned)*c][3] == 0) continue;
-		score += (*fun)(map[(unsigned)*p],map[(unsigned)*c]);
+		if(map[(unsigned char)*c][3] == 0) continue;
+		score += (*fun)(map[(unsigned char)*p],map[(unsigned char)*c]);
 		p=c;
 	}
 	return score;