Skip to content

Commit 7821552

Browse files
committed
Common (Windows): adds ffDebugNtStatus for debugging
1 parent cd8a0fc commit 7821552

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/common/debug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ static inline const char* ffFindFileName(const char* file)
3030

3131
#if _WIN32
3232
const char* ffDebugWin32Error(unsigned long errorCode);
33+
const char* ffDebugNtStatus(NTSTATUS status);
3334
#endif

src/common/impl/debug_windows.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,8 @@ const char* ffDebugWin32Error(DWORD errorCode)
2626

2727
return buffer;
2828
}
29+
30+
const char* ffDebugNtStatus(NTSTATUS status)
31+
{
32+
return ffDebugWin32Error(RtlNtStatusToDosError(status));
33+
}

src/common/impl/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ void ffInitInstance(void)
5555
setlocale(LC_TIME, "");
5656
#endif
5757

58-
initState(&instance.state);
5958
defaultConfig();
59+
initState(&instance.state);
6060
}
6161

6262
static volatile bool ffDisableLinewrap = true;

0 commit comments

Comments
 (0)