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

Fix linux build issues with demo actor #23

Merged
merged 6 commits into from
May 21, 2023
Merged

Conversation

phil-vela
Copy link
Contributor

When doing a linux server build I was getting some issues like:

In file included from /home/ubuntu/workspace/feature-net-imgui/vire/Plugins/UnrealNetImgui/Intermediate/Build/Linux/B4D820EA/UnrealEditor/Development/NetImgui/Module.NetImgui.11_of_11.cpp:9:
/home/ubuntu/workspace/feature-net-imgui/vire/Plugins/UnrealNetImgui/Source/Sample/NetImguiDemoActor.cpp:139:41: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
                                ImGui::TextColored(kColorHighlight, TCHAR_TO_UTF8(*titleKenney));
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/StringConv.h:970:28: note: expanded from macro 'TCHAR_TO_UTF8'
#define TCHAR_TO_UTF8(str) (ANSICHAR*)FTCHARToUTF8((const TCHAR*)str).Get()
                           ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/workspace/feature-net-imgui/vire/Plugins/UnrealNetImgui/Source/Sample/NetImguiDemoActor.cpp:139:41: note: treat the string as an argument to avoid this
                                ImGui::TextColored(kColorHighlight, TCHAR_TO_UTF8(*titleKenney));
                                                                    ^
                                                                    "%s",
/home/ubuntu/UnrealEngine/Engine/Source/Runtime/Core/Public/Containers/StringConv.h:970:28: note: expanded from macro 'TCHAR_TO_UTF8'
#define TCHAR_TO_UTF8(str) (ANSICHAR*)FTCHARToUTF8((const TCHAR*)str).Get()

and

In file included from /home/ubuntu/workspace/feature-net-imgui/vire/Plugins/UnrealNetImgui/Intermediate/Build/Linux/B4D820EA/UnrealEditor/Development/NetImgui/Module.NetImgui.11_of_11.cpp:9:
/home/ubuntu/workspace/feature-net-imgui/vire/Plugins/UnrealNetImgui/Source/Sample/NetImguiDemoActor.cpp:294:80: error: conversion from 'size_t' (aka 'unsigned long') to 'const FStringFormatArg' is ambiguous
                        FString windowName = FString::Format(TEXT("NetImguiDemoActor Tick###{0}"), {reinterpret_cast<size_t>(this)}); // '###+IntegerID' Generates a unique Window ID so each actor have their own window
                                                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Seems like it's just some default compiler args that don't appear on windows builds, this PR resolves

sammyfreg and others added 6 commits March 6, 2022 11:32
Dev->Main
Version 1.9 release
-Tested on UE5
-Updated FontAwesome to v6
Update to : Dear ImGui 1.88
Update to : NetImgui 1.88
Fix for Unreal Imgui Console
Copy link
Owner

@sammyfreg sammyfreg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually caused by a safety warning, telling you to use the string format function with a literal string, instead of dynamic string that could introduce memory injection hacking.

@sammyfreg
Copy link
Owner

Looks good. Could you change this pull request to the dev branch instead?
Thank you.

@phil-vela phil-vela changed the base branch from master to dev January 5, 2023 08:34
@phil-vela
Copy link
Contributor Author

Looks good. Could you change this pull request to the dev branch instead?
Thank you.

I’m accidentally pulling in some other commits so will remake - thanks for taking a look!

@phil-vela phil-vela marked this pull request as draft January 5, 2023 08:36
@sammyfreg sammyfreg marked this pull request as ready for review May 21, 2023 05:22
@sammyfreg sammyfreg merged commit a796326 into sammyfreg:dev May 21, 2023
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

Successfully merging this pull request may close these issues.

3 participants