Skip to content

Commit

Permalink
Merge pull request #1 from Tiamat-Defender/Tiamat-Defender-Imgui-Comp…
Browse files Browse the repository at this point in the history
…atibility-Fix

Update imrad.h
  • Loading branch information
Tiamat-Defender authored Feb 11, 2025
2 parents 666f0fe + 1b7dfd2 commit 4d3f740
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/imrad.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
#endif
#endif

#define IMRAD_INPUTTEXT_EVENT(clazz, member) \
[](ImGuiInputTextCallbackData* data) { return ((clazz*)data->UserData)->member(*data); }, this

namespace ImRad {

using Int2 = int[2];
Expand Down Expand Up @@ -1013,7 +1010,7 @@ inline void LoadStyle(std::string_view fname, float fontScaling = 1, ImGuiStyle*
}

ImFontConfig cfg;
strncpy(cfg.Name, key.c_str(), sizeof(cfg.Name));
strncpy_s(cfg.Name, key.c_str(), sizeof(cfg.Name));
cfg.Name[sizeof(cfg.Name) - 1] = '\0';
cfg.MergeMode = key == lastFont;
cfg.GlyphRanges = hasRange ? rngs.back().get() : nullptr;
Expand Down

0 comments on commit 4d3f740

Please # to comment.