segross / UnrealImGui

Unreal plug-in that integrates Dear ImGui framework into Unreal Engine 4.
MIT License
666 stars 211 forks source link

Limit `strcpy_s` call to Windows platform #64

Open douglaslassance opened 2 years ago

douglaslassance commented 2 years ago

Commit b346fa894d2e257ea40aef9816678a17d212d50d breaks macOS (an likely Linux) compatibility with the use of strcpy_s in Source/ImGui/Private/ImGuiContextManager.cpp on line 275.

My proposed merge request simply disables this code on non-Windows platforms. That said, we can probably support the added functionality on Linux and macOS by following this Stack Overflow answer.

valtiala commented 10 months ago

Unreal has for this purpose FPlatformString::Strcpy which is typedef'd to their own per-platform implementation. Used it myself and found no problems so far.

jonpas commented 10 months ago

https://github.com/IDI-Systems/UnrealImGui replaces all instances of strcpy_s with strncpy.