From a36f11cfa5a94b2c9115b98aa7ddfcd913f05690 Mon Sep 17 00:00:00 2001 From: Cinders <cinder@cinderblocks.biz> Date: Mon, 17 Aug 2015 22:29:15 -0600 Subject: [PATCH] ALCH-244 - Fix Japanese input --- indra/llwindow/llopenglview-objc.mm | 6 +++--- indra/llwindow/llwindowmacosx-objc.h | 2 +- indra/llwindow/llwindowmacosx.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 074f18900a..fd6be7d272 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -542,9 +542,9 @@ attributedStringInfo getSegments(NSAttributedString *str) { if (mMarkedTextAllowed) { - int replacement[2] = { - static_cast<int>(replacementRange.location), - static_cast<int>(replacementRange.length) + unsigned int replacement[2] = { + static_cast<unsigned int>(replacementRange.location), + static_cast<unsigned int>(replacementRange.length) }; unichar text[[aString length]]; diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index cef90b3451..9af0cd2979 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -142,7 +142,7 @@ void updatePreeditor(unsigned short *str); void setPreeditMarkedRange(int position, int length); void resetPreedit(); int wstring_length(const std::basic_string<wchar_t> & wstr, const int woffset, const int utf16_length, int *unaligned); -void setMarkedText(unsigned short *text, int *replacementRange, long text_len, attributedStringInfo segments); +void setMarkedText(unsigned short *text, unsigned int *replacementRange, long text_len, attributedStringInfo segments); void getPreeditLocation(float *location, unsigned int length); void allowDirectMarkedTextInput(bool allow, GLViewRef glView); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index f5300d65ad..02d1b16352 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -478,7 +478,7 @@ void resetPreedit() // For reasons of convenience, handle IME updates here. // This largely mirrors the old implementation, only sans the carbon parameters. -void setMarkedText(unsigned short *unitext, int *replacementRange, long text_len, attributedStringInfo segments) +void setMarkedText(unsigned short *unitext, unsigned int *replacementRange, long text_len, attributedStringInfo segments) { if (gWindowImplementation->getPreeditor()) { -- GitLab