https://git.reactos.org/?p=reactos.git;a=commitdiff;h=37b0646e76b5a78914b90…
commit 37b0646e76b5a78914b904727591909bad206267
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Jan 10 22:12:24 2025 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Jan 11 21:17:28 2025 +0100
[SDK:WINE] Fix get_temp_buffer() call in wine_dbgstr_wn()
Addendum to commit dbc7eeb47e (PR #4303).
The argument to get_temp_buffer() should specify the length of the
string being buffered + 1 (for the NUL-terminator).
The original code wrongly interverted this with specifying the buffer
shifted by one character.
---
sdk/include/reactos/wine/test.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk/include/reactos/wine/test.h b/sdk/include/reactos/wine/test.h
index 872ab75378a..4399a6f1714 100644
--- a/sdk/include/reactos/wine/test.h
+++ b/sdk/include/reactos/wine/test.h
@@ -747,7 +747,7 @@ const char *wine_dbgstr_wn( const WCHAR *str, intptr_t n )
}
*dst = 0;
- res = get_temp_buffer(strlen(buffer + 1));
+ res = get_temp_buffer(strlen(buffer) + 1);
strcpy(res, buffer);
return res;
}