Commits

arkdro  committed afcb3dc

fix small_int bug in eterm

  • Participants
  • Parent commits 01e3ae5

Comments (0)

Files changed (1)

File lib/ocamerl/ocamerl/eterm.ml

     | ET_bignum (Num.Big_int n) ->
         magic_small_big
         :: (Tools.chars_of_big_int n)
-    | ET_int n when n < 256l ->
+    | ET_int n when n >= 0l && n < 256l ->
         magic_small_int :: [char_of_int (Int32.to_int n)]
     | ET_int n ->
         magic_large_int :: (Tools.chars_of_int32 n 4)