typing_10_fingers git · main
10 finger typing trainer (CMake)
C 97.4% Markdown 2.6%git clone https://git.christianimmanuel.de/web-tools/typing_10_fingers.gitwget https://git.christianimmanuel.de/web-tools/typing_10_fingers/archive/typing_10_fingers.tar.gzFix: make use of whole char length instead of fixed
inout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inout.c b/inout.c index c2c0b03..c7d71b5 100644 --- a/inout.c +++ b/inout.c @@ -27,7 +27,7 @@ void getLine(wchar_t* line, wchar_t* chars, int length, int wc){ word_length = rand() % 6 + 4; continue; } - int ran = rand() % 4 + 0; + int ran = rand() % (wcslen(chars)); line[i] = chars[ran]; } line[i] = L'\0';