Author: jrieks
Date: Sun May  8 13:16:53 2005
New Revision: 8012

Modified:
   trunk/encodings/fixed_8.c
   trunk/encodings/utf8.c
Log:
fixed read access behind string boundary:
- do not throw an exception anymore
- instead, return 0 in get_bytes


Modified: trunk/encodings/fixed_8.c
==============================================================================
--- trunk/encodings/fixed_8.c   (original)
+++ trunk/encodings/fixed_8.c   Sun May  8 13:16:53 2005
@@ -53,9 +53,10 @@
 {
     unsigned char *contents = source_string->strstart;
     if (offset >= source_string->bufused) {
-       internal_exception(0,
+/*     internal_exception(0,
                "get_byte past the end of the buffer (%i of %i)",
-               offset, source_string->bufused);
+               offset, source_string->bufused);*/
+       return 0;
     }
     return contents[offset];
 }

Modified: trunk/encodings/utf8.c
==============================================================================
--- trunk/encodings/utf8.c      (original)
+++ trunk/encodings/utf8.c      Sun May  8 13:16:53 2005
@@ -387,9 +387,10 @@
 {
     unsigned char *contents = src->strstart;
     if (offset >= src->bufused) {
-       internal_exception(0,
+/*     internal_exception(0,
                "get_byte past the end of the buffer (%i of %i)",
-               offset, src->bufused);
+               offset, src->bufused);*/
+       return 0;
     }
     return contents[offset];
 }

Reply via email to