Fixed Segfault

This commit is contained in:
daniel committed 2026-09-30 20:32:11 +02:00
1 parent 1cc8d385c6
commit d206c0317b
3 files changed
+5 -3

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
*.out
*.exe
BIN
View File
Binary file not shown.
+3 -3
View File
@@ -3,7 +3,7 @@
#include <string.h>
void loadWords(char words[]) {
void loadWords(char words[][100]) {
FILE *f = fopen("words", "r");
char buffer[100] = {0};
@@ -20,7 +20,7 @@ void loadWords(char words[]) {
}
}
strcpy(&words[n][0], buffer);
strcpy(words[n], buffer);
n++;
}
@@ -33,7 +33,7 @@ void loadWords(char words[]) {
int main() {
char words[10][10] = {0};
char words[10][100] = {0};
loadWords(words);