Return proper NULL delimiter

NULL will get cast to (char)0 properly, but casting ‘\0’ (technically
an int) better expresses the intent that we mean to return the
terminating char.