Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/shiconov.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,14 @@ void InitShellIconOverlays()
ShellOverlayDiag.Header.IconSizes[2] = IconSizes[ICONSIZE_48];
ShellOverlayDiag.Header.SystemDpi = (UINT)SystemDPI;
ShellOverlayDiag.Header.EnableCustomIconOverlays = Configuration.EnableCustomIconOverlays != FALSE;
lstrcpynA(ShellOverlayDiag.Header.ConfigRoot, SALAMANDER_ROOT_REG,
// SALAMANDER_ROOT_REG is still NULL here whenever no configuration was found:
// FindLatestConfiguration() clears it up front and only assigns a root when a key with
// a "Configuration" subkey exists, and the fallback to SalamanderConfigurationRoots[0]
// happens later in the startup sequence than this call. Sally's lstrcpyn is the
// deliberately crashing variant from lstrfix.h, so NULL is an access violation here,
// not a truncated string. Every other reader of SALAMANDER_ROOT_REG guards for NULL.
lstrcpynA(ShellOverlayDiag.Header.ConfigRoot,
SALAMANDER_ROOT_REG != NULL ? SALAMANDER_ROOT_REG : "",
(int)sizeof(ShellOverlayDiag.Header.ConfigRoot));
if (Configuration.DisabledCustomIconOverlays != NULL)
{
Expand Down
Loading