Pārlūkot izejas kodu

Fixed map server crash in buildin_sscanf (#9131)

Fixes #9130

The error occurred due to incorrect &ref_str value being passed, which occurred in 1782bd1.

Co-authored-by: SalamandeRz-k7x <69644810+SalamandeRz-k7x@users.noreply.github.com>
StrawberrysherbetIX 2 mēneši atpakaļ
vecāks
revīzija
26421693c1
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/map/script.cpp

+ 1 - 1
src/map/script.cpp

@@ -17621,7 +17621,7 @@ BUILDIN_FUNC(sscanf){
 			if(ref_str==nullptr){
 				CREATE(ref_str, char, strlen(str)+1);
 			}
-			if( sscanf( str, buf, &ref_str ) != 1 ){
+			if( sscanf( str, buf, ref_str ) != 1 ){
 				ShowError( "buildin_sscanf: sscanf failed to scan value for string variable \"%s\".\n", buf_p );
 				script_pushint( st, -1 );
 				if( buf != nullptr ){