Skip to content

Commit

Permalink
Fix 3ds model loader segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Jun 6, 2024
1 parent c604e53 commit 1083ebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tms/modules/3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ load_3ds_model(struct tms_model *model,
}
//tms_infof("base index:%d", base_index);
tms_gbuffer_realloc(model->vertices, sz + num_items * sizeof(struct vertex));
vertex_buf = (struct vertex *)model->vertices->buf+sz;
vertex_buf = (struct vertex *)(model->vertices->buf+sz);

for (int x=0; x<num_items; x++) {
SDL_RWread(fp, &vertex_buf[x].pos, 4, 3);
Expand Down

0 comments on commit 1083ebd

Please sign in to comment.