Skip to content

Commit 349c200

Browse files
committed
fix: clear unused fields
1 parent df770d0 commit 349c200

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

Application/_components/BestScores.asm

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ proc BestScores.DrawScores uses eax ecx ebx,\
3232
mov ecx, [ebx]
3333
cmp ecx, 0
3434
je .exit
35+
cmp ecx, TABELS_ON_PAGE
36+
jbe @F
37+
mov ecx, TABELS_ON_PAGE
38+
@@:
3539
mov ebx, [object]
3640
.saveData:
3741
push edi
@@ -50,10 +54,26 @@ proc BestScores.DrawScores uses eax ecx ebx,\
5054
pop edi
5155
add edi, 4
5256
loop .saveData
53-
.exit:
5457
mov ebx, [count]
5558
mov ecx, [ebx]
56-
cmp ecx,
59+
cmp ecx, TABELS_ON_PAGE
60+
ja .exit
61+
mov eax, TABELS_ON_PAGE
62+
sub eax, ecx
63+
xchg ecx, eax
64+
.clearLoop:
65+
push edi
66+
mov edi, [edi]
67+
inc edi
68+
stdcall ConvertStringToOutputString, str_nullerror, edi
69+
add edi, 3
70+
stdcall ConvertStringToOutputString, str_nullerror, edi
71+
add edi, 31
72+
stdcall ConvertStringToOutputString, str_nullerror, edi
73+
pop edi
74+
add edi, 4
75+
loop .clearLoop
76+
.exit:
5777
stdcall BestScores.DataPrepears
5878
ret
5979
endp

File/API/API.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Login db 'QWERTY', 0; 30 dup(0), 0
2-
Password db '12345678', 0; 30 dup(0), 0
1+
Login db 30 dup(0), 0
2+
Password db 30 dup(0), 0
33
CurrentPlayerId dd 0
44
gameCounter dd 0
55

0 commit comments

Comments
 (0)