   form = cdr(form);
   while (form != NULL) {
     int chars = form->integer;
-    if (chars & 0xFF) length++;
-    if (chars & 0xFF00) length++;
+    for (int i=(sizeof(int)-1)*8; i>=0; i=i-8) {
+      if (chars>>i & 0xFF) length++;
+    }
     form = car(form);
   }
   return length;

    int arg = integer(car(args));
    if (arg == 0) error(PSTR("Division by zero"));
    #if defined(checkoverflow)
    if ((result == -32768) && (arg == -1)) error(PSTR("'/' arithmetic overflow"));
    #endif
    result = result / arg;
    args = cdr(args);

  args = cdr(args);
  if (args != NULL) increment = integer(eval(first(args), env));
  #if defined(checkoverflow)
  if (increment < 1) { if (INT_MIN - increment > result) error(PSTR("'incf' arithmetic overflow")); }
  else { if (INT_MAX - increment < result) error(PSTR("'incf' arithmetic overflow")); }
  #endif
  result = result + increment;
  *loc = number(result);
