def iter_nullstr(file):
    """Read a null-terminated ASCII string from the file.
    
    This continuously yields strings, with empty strings 
    indicting the end of a section.
    """
    chars = bytearray()
    while True:
        char = file.read(1)
        if char == b'\x00':
            string = chars.decode('ascii')
            chars.clear()
            if string == ' ':
                yield ''
            elif string == '':
                return
            else:
                yield string
        elif char == b'':
            raise Exception('Reached EOF without null-terminator in {}!'.
                format(bytes(chars)))
        else:
            chars.extend(char)
