[Scummvm-tracker] [ScummVM :: Bugs] #12012: BACKENDS: AMIGAOS: Rewrote of encoder causes assertion on typing ALT+(WASDXC) key combos (AmigaOS4)

ScummVM :: Bugs trac at scummvm.org
Sun Jan 17 14:01:58 UTC 2021


#12012: BACKENDS: AMIGAOS: Rewrote of encoder causes assertion on typing
ALT+(WASDXC) key combos (AmigaOS4)
---------------------------------------+---------------------
Reporter:  raziel-                     |       Owner:  (none)
    Type:  defect                      |      Status:  new
Priority:  normal                      |   Component:  Common
 Version:                              |  Resolution:
Keywords:  regression, encoder, iconv  |        Game:
---------------------------------------+---------------------
Comment (by ccawley2011):

 Could you try this patch and see if it works?

 {{{
 diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-
 events.cpp
 index 292ab95691..7581078992 100644
 --- a/backends/events/sdl/sdl-events.cpp
 +++ b/backends/events/sdl/sdl-events.cpp
 @@ -38,7 +38,11 @@
  #define GAMECONTROLLERDB_FILE "gamecontrollerdb.txt"

  static uint32 convUTF8ToUTF32(const char *src) {
 +       if (!src || src[0] == 0)
 +               return 0;
 +
         Common::U32String u32(src);
 +       assert(u32.size() > 0);
         return u32[0];
  }

 }}}

 If it does fix the issue, the root issue may be an SDL bug, since an empty
 string probably shouldn't be returned for SDL_TEXTINPUT events.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/12012#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list