File penguin-command-1.6.11-hiscore.patch of Package penguin-command

--- src/SFont.c
+++ src/SFont.c
@@ -180,8 +180,10 @@
 	    if (((ch>31)||(ch=='\b')) && (ch<128)) {
 		if ((ch=='\b')&&(strlen(text)>0))
 		    text[strlen(text)-1]='\0';
-		else if (ch!='\b')
-		    sprintf(text,"%s%c",text,ch);
+		else if (ch!='\b') {
+		    text[strlen(text)+1]='\0';
+		    text[strlen(text)  ]=ch;
+		}
 	        if (SFont_TextWidth2(Font,text)>PixelWidth) text[strlen(text)-1]='\0';
 		SDL_BlitSurface( Back, NULL, Dest, &rect);
 		PutString2(Dest, Font, x, y, text);
openSUSE Build Service is sponsored by