Skip to content

Commit e8206db

Browse files
committed
InputText: Fixed crash introduced by 5a2b1e8 (#6292, #4714)
1 parent 5f30191 commit e8206db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

imgui.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
// Library Version
2424
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
2525
#define IMGUI_VERSION "1.89.5 WIP"
26-
#define IMGUI_VERSION_NUM 18946
26+
#define IMGUI_VERSION_NUM 18947
2727
#define IMGUI_HAS_TABLE
2828

2929
/*

imgui_widgets.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4036,7 +4036,7 @@ void ImGui::InputTextDeactivateHook(ImGuiID id)
40364036
return;
40374037
g.InputTextDeactivatedState.ID = state->ID;
40384038
g.InputTextDeactivatedState.TextA.resize(state->CurLenA + 1);
4039-
memcpy(g.InputTextDeactivatedState.TextA.Data, state->TextA.Data, state->CurLenA + 1);
4039+
memcpy(g.InputTextDeactivatedState.TextA.Data, state->TextA.Data ? state->TextA.Data : "", state->CurLenA + 1);
40404040
}
40414041

40424042
// Edit a string of text

0 commit comments

Comments
 (0)