Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:makuto/cakelisp
Browse files Browse the repository at this point in the history
  • Loading branch information
makuto committed Oct 12, 2021
2 parents 9040d38 + e123b33 commit 0c32eca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/FileUtilities.cake
Expand Up @@ -122,8 +122,9 @@
(fseek in-file 0 SEEK_END)
(var file-size size_t (ftell in-file))
(rewind in-file)
(var-cast-to out-buffer (* char) (malloc file-size))
(var-cast-to out-buffer (* char) (malloc (+ 1 file-size)))
(fread out-buffer file-size 1 in-file)
(set (at file-size out-buffer) 0)
(return out-buffer))

(defun write-string (out-file (* FILE) out-string (* (const char)))
Expand Down

0 comments on commit 0c32eca

Please sign in to comment.