Update m3d.h

fix alignment issue.
pull/2885/head
Kim Kulling 2020-03-27 11:38:38 +01:00 committed by GitHub
parent 80323b57bc
commit 32c59643f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -5440,13 +5440,13 @@ unsigned char *m3d_save(m3d_t *model, int quality, int flags, unsigned int *size
out += 2; out += 2;
break; break;
case 4: case 4:
*((float *)out) = vrtx[i].data.x; memcpy(out, &vrtx[i].data.x, sizeof(float));
out += 4; out += 4;
*((float *)out) = vrtx[i].data.y; memcpy(out, &vrtx[i].data.y, sizeof(float));
out += 4; out += 4;
*((float *)out) = vrtx[i].data.z; memcpy(out, &vrtx[i].data.z, sizeof(float));
out += 4; out += 4;
*((float *)out) = vrtx[i].data.w; memcpy(out, &vrtx[i].data.w, sizeof(float));
out += 4; out += 4;
break; break;
case 8: case 8: