diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index 51d9e206e2..67a3946b2f 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -1757,9 +1757,10 @@ static int S_LookupPlayerSound (int classidx, int gender, FSoundID refid) { int g; - for (g = 0; g < GENDER_MAX && listidx == 0xffff; ++g) + for (g = 0; g < GENDER_MAX; ++g) { listidx = PlayerClassLookups[classidx].ListIndex[g]; + if (listidx != 0xffff) break; } if (g == GENDER_MAX) { // No sounds defined at all for this class (can this happen?)