Index: etc/config/src/LIMITS.cpp
===================================================================
--- etc/config/src/LIMITS.cpp   (revision 616446)
+++ etc/config/src/LIMITS.cpp   (working copy)
@@ -216,8 +216,10 @@
 {
     unsigned bits = 0;
 
-    for (unsigned char c = '\01'; c; c <<= 1, ++bits);
+    unsigned char pc = '\02'; // arbitrary value not equal to '\01'
 
+    for (unsigned char c = '\01'; c; c <<= 1) { if(c == pc) break; pc =
c; bits++; }
+
     printf ("#define _RWSTD_CHAR_BIT    %2u\n", bits);
 
     return bits;

Reply via email to