Re: [hatari-devel] Little bug into the symbols loading

[ Thread Index | Date Index | More Archives ]


On perjantai 19 heinäkuu 2013, laurent.sallafranque@xxxxxxx wrote:
> I think there's a little problem with the symbols loader :
> Under windows, my atari files are under "C:\Users\Laurent\Mes
> Documents\..."
> When I activate "symbols prg", I get the following error :
> ERROR: reading file 'C:\Users\Laurent\Documents\...
> I mean one directory name contains a SPACE and it seems to be cropped by
> the symbols loader function (the beginning "Mes " before "Documents" is
> lost).

The code doing the reading in symbols.c looks following:
static symbol_list_t* Symbols_Load(const char *filename, Uint32 *offsets, 
Uint32 maxaddr)
        symbol_list_t *list;
        Uint16 magic;
        FILE *fp;

        if (!(fp = fopen(filename, "r"))) {
                fprintf(stderr, "ERROR: opening '%s' failed!\n", filename);
                return NULL;
        if (fread(&magic, sizeof(magic), 1, fp) != 1) {
                fprintf(stderr, "ERROR: reading file '%s' failed.\n", 
                return NULL;

I.e. based on your error message, it managed to open the file in question,
it was reading of that which failed...?

The filename comes as-is from GEMDOS emulation, so if GEMDOS emulation
was able to execute your file (which requires opening & reading it),
the file name (including the path) "should" be right...

	- Eero

Mail converted by MHonArc 2.6.19+