Skip to content

Commit

Permalink
InputText: Fixed crash introduced by 5a2b1e8 (ocornut#6292, ocornut#4714
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ocornut authored and kjblanchard committed May 5, 2023
1 parent f5e6d73 commit 0014aa2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
#define IMGUI_VERSION "1.89.5 WIP"
#define IMGUI_VERSION_NUM 18946
#define IMGUI_VERSION_NUM 18947
#define IMGUI_HAS_TABLE

/*
Expand Down
2 changes: 1 addition & 1 deletion imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4036,7 +4036,7 @@ void ImGui::InputTextDeactivateHook(ImGuiID id)
return;
g.InputTextDeactivatedState.ID = state->ID;
g.InputTextDeactivatedState.TextA.resize(state->CurLenA + 1);
memcpy(g.InputTextDeactivatedState.TextA.Data, state->TextA.Data, state->CurLenA + 1);
memcpy(g.InputTextDeactivatedState.TextA.Data, state->TextA.Data ? state->TextA.Data : "", state->CurLenA + 1);
}

// Edit a string of text
Expand Down

0 comments on commit 0014aa2

Please sign in to comment.