steam_helper: Don't write garbage memory to libraryfolders.vdf.

buf_len is the size of allocated buffer, pos should be used instead when
determining how much to write.
This commit is contained in:
Arkadiusz Hiler 2025-04-30 07:49:49 +03:00
parent ecebf8c6e6
commit 7d79990d4b

View File

@ -680,7 +680,7 @@ static void setup_steam_files(void)
} }
pos += strappend( &buf, &buf_size, pos, "}\n" ); pos += strappend( &buf, &buf_size, pos, "}\n" );
write_file( L"C:\\Program Files (x86)\\Steam\\steamapps\\libraryfolders.vdf", buf, buf_size ); write_file( L"C:\\Program Files (x86)\\Steam\\steamapps\\libraryfolders.vdf", buf, pos );
} }
#ifndef DIRECTORY_QUERY #ifndef DIRECTORY_QUERY