formats: Merge sd_rec_load() if statements
@@ -70,12 +70,11 @@ int sd_rec_load(sd_rec_file *rec, const char *file) {
sd_palette_load_range(r, &rec->pilots[i].pal, 0, 48);
rec->pilots[i].has_photo = sd_read_ubyte(r);
sd_sprite_create(&rec->pilots[i].photo);
- if(rec->pilots[i].has_photo) {
- if((ret = sd_sprite_load(r, &rec->pilots[i].photo)) != SD_SUCCESS) {
+ if((rec->pilots[i].has_photo) &&
+ (ret = sd_sprite_load(r, &rec->pilots[i].photo)) != SD_SUCCESS) {
goto error_0;
}
}
- }
// Scores
for(int i = 0; i < 2; i++)
