Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo on Line 5577 in File olcPixelGameEngine.h #310

Open
YmmitZtrol opened this issue Dec 7, 2022 · 0 comments
Open

Typo on Line 5577 in File olcPixelGameEngine.h #310

YmmitZtrol opened this issue Dec 7, 2022 · 0 comments

Comments

@YmmitZtrol
Copy link

YmmitZtrol commented Dec 7, 2022

olcPixelGameEngine.h Line 5577

In class - olc::Platform_Windows
Function - static LRESULT CALLBACK olc_WindowEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)

for (uint32_t i = 0; i < nFiles; i++)
{
	TCHAR dfbuffer[256]{};
	uint32_t len = DragQueryFile(drop, i, nullptr, 0);
	DragQueryFile(drop, i, dfbuffer, 256);
#ifdef UNICODE
	#ifdef __MINGW32__
			char* buffer = new char[len + 1];
			wcstombs(buffer, dfbuffer, len);
			buffer[len] = '\0';
	#else
			int count = WideCharToMultiByte(CP_UTF8, 0, dfbuffer, -1, NULL, 0, NULL, NULL);
			char* buffer = new char[count];
			WideCharToMultiByte(CP_UTF8, 0, dfbuffer, -1, buffer, count, NULL, NULL);
	#endif				
			vFiles.push_back(std::string(buffer));
			delete[] buffer;
#else
			vFiles.push_back(std::string(dbuffer));
#endif
}

vFiles.push_back(std::string(dbuffer));
Should be (I'm pretty sure)
vFiles.push_back(std::string(dfbuffer));

@YmmitZtrol YmmitZtrol changed the title Type on Line 5577 in File olcPixelGameEngine.h Typo on Line 5577 in File olcPixelGameEngine.h Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant