I’m trying to read a string and verify it’s magic number (0xFEEDFACE); but I don’t know how to insert an ascii character (as a number) into strings.
Here is my code:
;; Parser library for the Source Engine Nav mesh format.
(defun parse-nav-string (input-string) "Parses string as Nav file."
;; Test for magic string 0xFEEDFACE.
(cond
(string= (subseq input-string 0 3)
(concatenate (code-char #xCE) (code-char #xFA) (code-char #xED) (code-char #xFE))
)
(t (format *error-output* "Magic string not found!") )
)
()
)
You must log in or # to comment.