@@ -1252,11 +1252,13 @@ static int uv__kill(HANDLE process_handle, int signum) {
12521252 return UV_EINVAL ;
12531253 }
12541254
1255- // Create a dump file for the targeted process, if the registry key
1256- // `HKLM:Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpFolder`
1257- // points to a valid folder. The default value if the registry key does not
1258- // exist is `%LOCALAPPDATA%\CrashDumps`, see [0] for more detail.
1259- // [0]: https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
1255+ /*
1256+ * Create a dump file for the targeted process, if the registry key
1257+ * `HKLM:Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\DumpFolder`
1258+ * points to a valid folder. The default value if the registry key does not
1259+ * exist is `%LOCALAPPDATA%\CrashDumps`, see [0] for more detail.
1260+ * [0]: https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps
1261+ */
12601262 if (signum == SIGQUIT ) {
12611263 // Get process name
12621264 WCHAR basename [MAX_PATH ];
@@ -1287,11 +1289,10 @@ static int uv__kill(HANDLE process_handle, int signum) {
12871289 // Default value for `dump_folder` is `%LOCALAPPDATA%\CrashDumps`
12881290 WCHAR * localappdata ;
12891291 SHGetKnownFolderPath (& FOLDERID_LocalAppData , 0 , NULL , & localappdata );
1290- swprintf_s (dump_folder , sizeof (dump_folder ), L"%ls\\CrashDumps" , localappdata );
1292+ _snwprintf (dump_folder , sizeof (dump_folder ), L"%ls\\CrashDumps" , localappdata );
12911293 CoTaskMemFree (localappdata );
12921294 }
12931295 RegCloseKey (registry_key );
1294- }
12951296
12961297 // Construct dump filename
12971298 WCHAR dump_name [MAX_PATH ];
0 commit comments