diff options
Diffstat (limited to 'netbytes.c')
-rw-r--r-- | netbytes.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -519,7 +519,7 @@ int nb_load( netbyte_store *store, uint8_t *data ) __NBT_SIZE size; memcpy( &size, c, sizeof(__NBT_SIZE) ); - printf("size: %d\n", size); + printf("NB_LOAD size: %d\n", size); size -= sizeof(__NBT_SIZE); c += sizeof(__NBT_SIZE); @@ -600,12 +600,14 @@ int nb_load( netbyte_store *store, uint8_t *data ) } case NBT_U32: { - nb_u32 *u32 = malloc( sizeof(nb_u32) ); - - memcpy( u32, c, sizeof(nb_u32) ); + //FIXIT in all places + //nb_u32 *u32 = malloc( sizeof(nb_u32) ); + nb_u32 u32; + + memcpy( &u32, c, sizeof(nb_u32) ); c += sizeof(nb_u32); - nb_add_u32( store, u32 ); + nb_add_u32( store, &u32 ); break; } case NBT_U32ARRAY: |