summary refs log tree commit diff stats
path: root/lib/system/endb.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/endb.nim')
-rw-r--r--lib/system/endb.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/system/endb.nim b/lib/system/endb.nim
index b2cc5624b..92aae8c71 100644
--- a/lib/system/endb.nim
+++ b/lib/system/endb.nim
@@ -329,14 +329,14 @@ proc dbgStackFrame(s: cstring, start: int, currFrame: PFrame) =
 
 proc readLine(f: File, line: var StaticStr): bool =
   while true:
-    var c = fgetc(f)
+    var c = c_fgetc(f)
     if c < 0'i32:
       if line.len > 0: break
       else: return false
     if c == 10'i32: break # LF
     if c == 13'i32:  # CR
-      c = fgetc(f) # is the next char LF?
-      if c != 10'i32: ungetc(c, f) # no, put the character back
+      c = c_fgetc(f) # is the next char LF?
+      if c != 10'i32: discard c_ungetc(c, f) # no, put the character back
       break
     add line, chr(int(c))
   result = true