Skip to content

Commit d0b1165

Browse files
committed
fixing bug if player name has space in it
1 parent 8b2e311 commit d0b1165

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Client/Atari/FujiLlama.bas

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,13 @@ myName$=""
242242
@ToUpper(&myName$)
243243

244244
if len(myName$)=0 then myName$="LORENZO" ' Default if not loaded from the App key
245+
if len(myName$)>10 then myName$=myName$[1,10] ' Limit name to 10 characters
246+
for i=1 to len(myName$)
247+
if myName$[i,1]=" "
248+
myName$=myName$[1,i] ' if space in name truncate it
249+
exit
250+
endif
251+
next i
245252

246253
' Game state variables
247254
Drawdeck=0
@@ -721,7 +728,7 @@ PROC SetPlayerName
721728
endif
722729
loop
723730

724-
' Name has been captured. Save to app key
731+
' Name has been captured. Save to app key
725732
@NWriteAppKey AK_LOBBY_CREATOR_ID, AK_LOBBY_APP_ID, AK_LOBBY_KEY_USERNAME, &myName$
726733

727734
ENDPROC

Client/Atari/bin/FujiLlama.xex

62 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)