From f6e9684df1d502200421f319b99d9b4e0dc7d372 Mon Sep 17 00:00:00 2001 From: Mockba the Borg Date: Sat, 2 Nov 2024 00:55:26 -0400 Subject: [PATCH] VStudio SUBMIT loop - bug fix --- RunCPM/abstraction_vstudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RunCPM/abstraction_vstudio.h b/RunCPM/abstraction_vstudio.h index 9f3c071..714f3b6 100644 --- a/RunCPM/abstraction_vstudio.h +++ b/RunCPM/abstraction_vstudio.h @@ -424,7 +424,7 @@ uint8 _Truncate(char* fn, uint8 rc) { wchar_t filename[128]; uint8 fullpath[128] = FILEBASE; strcat((char*)fullpath, fn); - MultiByteToWideChar(CP_ACP, 0, (char*)fullpath, -1, filename, 15); + MultiByteToWideChar(CP_ACP, 0, (char*)fullpath, -1, filename, strlen(fullpath)+1); HANDLE fh = CreateFileW(filename, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (fh == INVALID_HANDLE_VALUE) { result = 0xff;