Fix the sfload_mem example to actually read back the pointer address

This commit is contained in:
sykhro 2018-09-19 01:18:42 +02:00
parent 457edfcdda
commit 78a6ce71a3
1 changed files with 2 additions and 3 deletions

View File

@ -19,14 +19,13 @@ void *my_open(const char *filename)
return NULL; return NULL;
} }
scanf("&%p", &p); sscanf(filename, "&%p", &p);
return p; return p;
} }
int my_read(void *buf, int count, void *handle) int my_read(void *buf, int count, void *handle)
{ {
// not yet implemented // NYI
memset(buf, 0, count);
return FLUID_OK; return FLUID_OK;
} }