diff options
author | FreeArtMan <dos21h@gmail.com> | 2017-08-21 23:40:07 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2017-08-21 23:40:07 +0100 |
commit | de6abbfddf1b0e15f444f4fe2a642d3a9775eec7 (patch) | |
tree | 7f243d875461034ce56d0d62d6ac302d66d0e702 /netbytes.c | |
parent | 40e4b1da84808b4e592126e037601f5b6ccc0e25 (diff) | |
download | netbytes-de6abbfddf1b0e15f444f4fe2a642d3a9775eec7.tar.gz netbytes-de6abbfddf1b0e15f444f4fe2a642d3a9775eec7.zip |
Small bug fixed
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: |