# SDL\_mixer: MIX\_SetTrack3DPosition: Fixed typo where we checked the wrong array index.

**URL:** <https://discourse.libsdl.org/t/sdl-mixer-mix-settrack3dposition-fixed-typo-where-we-checked-the-wrong-array-index/69759>\
**Category:** SDL Commits\
**Created:** [November 5, 2026, 3:40am UTC](https://discourse.libsdl.org/t/sdl-mixer-mix-settrack3dposition-fixed-typo-where-we-checked-the-wrong-array-index/69759 "2026-11-05T03:40:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [November 5, 2026, 3:40am UTC](https://discourse.libsdl.org/t/sdl-mixer-mix-settrack3dposition-fixed-typo-where-we-checked-the-wrong-array-index/69759/1 "2026-11-05T03:40:02Z")

</div>

> <https://github.com/libsdl-org/SDL_mixer/commit/72cb03c61f2734ae9f3541003f2847b4f6b73684>
>
> Fixes #904.

```diff
From 72cb03c61f2734ae9f3541003f2847b4f6b73684 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 4 Nov 2026 22:35:50 -0500
Subject: [PATCH] MIX_SetTrack3DPosition: Fixed typo where we checked the wrong
 array index.

Fixes #904.
---
 src/SDL_mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SDL_mixer.c b/src/SDL_mixer.c
index b1ef3f58..abdccd46 100644
--- a/src/SDL_mixer.c
+++ b/src/SDL_mixer.c
@@ -2854,7 +2854,7 @@ bool MIX_SetTrack3DPosition(MIX_Track *track, const MIX_Point3D *position)
         track->position3d[0] = track->position3d[1] = track->position3d[2] = 0.0f;
     } else {
         float *tposition3d = track->position3d;
- if (toggling || ((tposition3d[0] != position->x) || (tposition3d[2] != position->y) || (tposition3d[2] != position->z))) {
+ if (toggling || ((tposition3d[0] != position->x) || (tposition3d[1] != position->y) || (tposition3d[2] != position->z))) {
             tposition3d[0] = position->x;
             tposition3d[1] = position->y;
             tposition3d[2] = position->z;

```
