stoonboii10 / garglk

Automatically exported from code.google.com/p/garglk
Other
0 stars 0 forks source link

garglk: glk_put_char_stream_uni writes to wrong stream #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The implementation of glk_put_char_stream_uni writes to the "current
stream" instead of the specified stream.  Here's a patch to correct this.

Index: garglk/cgstream.c
===================================================================
--- garglk/cgstream.c   (revision 242)
+++ garglk/cgstream.c   (working copy)
@@ -1433,13 +1433,13 @@
 void glk_put_char_stream_uni(stream_t *str, glui32 ch)
 {
     if (!str) {
         gli_strict_warning("put_char_stream_uni: invalid ref");
         return;
     }
-    gli_put_char_uni(gli_currentstr, ch);
+    gli_put_char_uni(str, ch);
 }

 void glk_put_string(char *s)
 {
   gli_put_buffer(gli_currentstr, s, strlen(s));
 }

Original issue reported on code.google.com by nit...@gmail.com on 1 Aug 2009 at 3:42

GoogleCodeExporter commented 8 years ago
Nice catch and thanks for the patch! Is this Evin Robertson? I can add you to 
the
project credits.

Fixed in r243.

Original comment by bcressey@gmail.com on 3 Aug 2009 at 10:27