oldloader.c
changeset 2663 e5a3df7f225a
parent 2498 3ed05caa4449
child 2752 55e04dee346d
equal deleted inserted replaced
2662:8b46824bd821 2663:e5a3df7f225a
   191 				}
   191 				}
   192 			} else {
   192 			} else {
   193 				uint32 res = 0;
   193 				uint32 res = 0;
   194 
   194 
   195 				/* Reading from the file: bit 16 to 23 have the FILE */
   195 				/* Reading from the file: bit 16 to 23 have the FILE */
   196 				switch (((chunk->type >> 16) & 0xFF) << 16) {
   196 				switch (GB(chunk->type, 16, 8) << 16) {
   197 					case OC_FILE_I8:
   197 					case OC_FILE_I8:
   198 						res = ReadByte(ls);
   198 						res = ReadByte(ls);
   199 						res = (int8)res;
   199 						res = (int8)res;
   200 						break;
   200 						break;
   201 
   201 
   232 
   232 
   233 				/* Sanity check */
   233 				/* Sanity check */
   234 				assert(base_ptr != NULL || chunk->ptr != NULL);
   234 				assert(base_ptr != NULL || chunk->ptr != NULL);
   235 
   235 
   236 				/* Writing to the var: bit 8 till 15 have the VAR */
   236 				/* Writing to the var: bit 8 till 15 have the VAR */
   237 				switch (((chunk->type >> 8) & 0xFF) << 8) {
   237 				switch (GB(chunk->type, 8, 8) << 8) {
   238 					case OC_VAR_I8:
   238 					case OC_VAR_I8:
   239 						/* Write the data */
   239 						/* Write the data */
   240 						if (chunk->ptr != NULL) {
   240 						if (chunk->ptr != NULL) {
   241 							*(int8 *)ptr = res & 0xFF;
   241 							*(int8 *)ptr = res & 0xFF;
   242 							ptr++;
   242 							ptr++;