summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system')
-rwxr-xr-xlib/system/repr.nim5
-rwxr-xr-xlib/system/sysio.nim2
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/system/repr.nim b/lib/system/repr.nim
index ec02f5e08..83fa7aa1d 100755
--- a/lib/system/repr.nim
+++ b/lib/system/repr.nim
@@ -75,7 +75,7 @@ proc addSetElem(result: var string, elem: int, typ: PNimType) =
   of tyBool: add result, reprBool(bool(elem))
   of tyChar: add result, reprChar(chr(elem))
   of tyRange: addSetElem(result, elem, typ.base)
-  of tyInt..tyInt64: add result, reprInt(elem)
+  of tyInt..tyInt64, tyUInt8, tyUInt16: add result, reprInt(elem)
   else: # data corrupt --> inform the user
     add result, " (invalid data!)"
 
@@ -221,6 +221,9 @@ when not defined(useNimRtl):
     of tyInt16: add result, $int(cast[ptr Int16](p)[])
     of tyInt32: add result, $int(cast[ptr Int32](p)[])
     of tyInt64: add result, $(cast[ptr Int64](p)[])
+    of tyUInt8: add result, $ze(cast[ptr Int8](p)[])
+    of tyUInt16: add result, $ze(cast[ptr Int16](p)[])
+    
     of tyFloat: add result, $(cast[ptr float](p)[])
     of tyFloat32: add result, $(cast[ptr float32](p)[])
     of tyFloat64: add result, $(cast[ptr float64](p)[])
diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim
index 15f87896a..ac0880f79 100755
--- a/lib/system/sysio.nim
+++ b/lib/system/sysio.nim
@@ -199,7 +199,7 @@ proc Open(f: var TFile, filename: string,
   var p: pointer = fopen(filename, FormatOpen[mode])
   result = (p != nil)
   f = cast[TFile](p)
-  if bufSize > 0 and bufSize <= high(cint):
+  if bufSize > 0 and bufSize <= high(cint).int:
     if setvbuf(f, nil, IOFBF, bufSize.cint) != 0'i32:
       raise newException(EOutOfMemory, "out of memory")
   elif bufSize == 0: