Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Nov 26, 2024
1 parent 9da3b62 commit a6e688a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/nCine/Backends/Android/AndroidInputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,11 @@ namespace nCine
return;
}

textInputEvent_.length = copyStringFirst(textInputEvent_.text, sizeof(textInputEvent_.text), chars);
textInputEvent_.length = strlen(chars);
if (textInputEvent_.length > sizeof(textInputEvent_.text)) {
textInputEvent_.length = sizeof(textInputEvent_.text);
}
std::memcpy(textInputEvent_.text, chars, textInputEvent_.length);
LOGW("ANDROIDKEY TEXT DISPATCH: %i | %s", textInputEvent_.length, String(textInputEvent_.text, textInputEvent_.length).data());
if (textInputEvent_.length > 0) {
inputEventHandler_->OnTextInput(textInputEvent_);
Expand Down

0 comments on commit a6e688a

Please sign in to comment.