Skip to content

Commit ab86bb5

Browse files
committed
Fix #6
1 parent 59f4cac commit ab86bb5

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

files/russian.dict

-5.81 KB
Binary file not shown.

files_src/convert.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22

3-
tr -d '\04' < russian.ucs2.dict > ../files/russian.dict
3+
tr -d '\04\r\0' < russian.ucs2.dict > ../files/russian.dict
44

helpers/hangman.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ char* hangman_get_random_word(const char* dict_file) {
1717
if(!seek_result) {
1818
stream_rewind(stream);
1919
}
20-
21-
stream_read_line(stream, line);
22-
} else {
23-
stream_read_line(stream, line);
2420
}
21+
stream_read_line(stream, line);
2522
} else {
2623
furi_crash(NULL);
2724
}
2825

29-
furi_string_trim(line);
26+
furi_string_trim(line, "\n");
3027

3128
char* word = strdup(furi_string_get_cstr(line));
3229
furi_string_free(line);

0 commit comments

Comments
 (0)