about summary refs log tree commit diff
path: root/mapScore.c
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-08-28 18:33:29 -0400
committerZach DeCook <zachdecook@librem.one>2023-08-28 18:33:29 -0400
commit0bb685ea05f554a07fbc98f861eef6dc4f79eb31 (patch)
tree5f3a33fe7e760428fac845ecf52d39b4da14a3a8 /mapScore.c
parentd601ee00e2d3e983ce8ab3b20db40f15eae9b4bd (diff)
downloadswipeGuess-0bb685ea05f554a07fbc98f861eef6dc4f79eb31.tar.gz
mapScore: Make case-insensitive
Diffstat (limited to 'mapScore.c')
-rw-r--r--mapScore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mapScore.c b/mapScore.c
index 21b0490..f003bc9 100644
--- a/mapScore.c
+++ b/mapScore.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <ctype.h>
 
 #define BUFSIZE 1024
 char buffer[BUFSIZE];
@@ -14,9 +15,12 @@ void makeMap(FILE *f) {
 		case '\t': x++; break;
 		case '\n': y++; x=0; break;
 		default:
+		explicit_label:
 			map[c][0] = x;
 			map[c][1] = y;
 			map[c][2] = 1;
+			c = toupper(c);
+			if (map[toupper(c)][2] == 0) goto explicit_label;
 			break;
 		}
 	}