Skip to content

Commit

Permalink
Fixing string creation during Windows error message formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ktakashi committed Jan 23, 2025
1 parent e14f82f commit 495d6af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/win/win_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static SgObject get_last_error(DWORD e)
MSG_SIZE,
0,
NULL);
if (size == 0) return SG_STRING("*no error message available*");
if (size == 0) return SG_MAKE_STRING("*no system error message available*");

if (size > 2 && msg[size - 2] == '\r') {
msg[size - 2] = 0;
Expand Down

0 comments on commit 495d6af

Please sign in to comment.