Revision: 1874
Author: jsuijs
Date: Mon Apr  5 13:09:27 2010
Log: fix of print_string to handle 0-terminated strings, shorter than the array size.
http://code.google.com/p/jallib/source/detail?r=1874

Modified:
 /trunk/include/jal/print.jal

=======================================
--- /trunk/include/jal/print.jal        Fri Mar 26 14:18:01 2010
+++ /trunk/include/jal/print.jal        Mon Apr  5 13:09:27 2010
@@ -47,7 +47,8 @@
    var word len = count(str)
    var byte i

-   for len using i loop
+   for len using i loop
+      if (str[i] == 0) then exit loop end if
       device = str[i]
    end loop

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to