File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -254,6 +254,7 @@ void ReplaceWemData(HWND window)
254254 MessageBox (window , infoMessage , "a" , 0 );
255255 }
256256 const char * currentPosition ;
257+ char * currentFileNameBuffer = alloca (UNICODE_STRING_MAX_BYTES + 1 ); // assuming long paths and utf-8 are enabled, this might be correct? idc
257258 for (uint32_t i = 0 ; i < selectedChildItemsDataList .length ; i ++ ) {
258259 if (i % nFilesSelected == 0 )
259260 currentPosition = fileNameInfo .lpstrFile ;
@@ -262,7 +263,7 @@ void ReplaceWemData(HWND window)
262263 currentFileName = fileNameInfo .lpstrFile ;
263264 } else {
264265 currentPosition += strlen (currentPosition ) + 1 ;
265- currentFileName = alloca ( UNICODE_STRING_MAX_BYTES + 1 ); // assuming long paths and utf-8 are enabled, this might be correct? idc
266+ currentFileName = currentFileNameBuffer ;
266267 sprintf (currentFileName , "%s\\%s" , fileNameInfo .lpstrFile , currentPosition );
267268 }
268269 printf ("current file name: \"%s\"\n" , currentFileName );
You can’t perform that action at this time.
0 commit comments