Skip to content
Myr

Merge branch 'kc/fix-coverity-issues-1' of https://github.com/krcroft/stb into work2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Sean Barrett · committed by Sean Barrett · parents 6a6e028, 58e0c44 · Browse files · 1 file+1 added−41 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−41 removed

  • other:+1 added−41 removed

1 file+1 added−41 removed

modified:stb_vorbis.c+1 added-41 removed
2131 unmodified lines
2132 #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE2133 ++class_set;2134 #endif2135 }2136 } else if (ch == 1) {2136 } else if (ch > 2) {2137 while (pcount < part_read) {2138 int z = r->begin + pcount*r->part_size;2139 int c_inter = 0, p_inter = z;2140 if (pass == 0) {2141 Codebook *c = f->codebooks+r->classbook;2142 int q;2143 DECODE(q,f,c);2144 if (q == EOP) goto done;2145 #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE2146 part_classdata[0][class_set] = r->classdata[q];2147 #else2148 for (i=classwords-1; i >= 0; --i) {2149 classifications[0][i+pcount] = q % r->classifications;2150 q /= r->classifications;2151 }2152 #endif2153 }2154 for (i=0; i < classwords && pcount < part_read; ++i, ++pcount) {2155 int z = r->begin + pcount*r->part_size;2156 #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE2157 int c = part_classdata[0][class_set][i];2158 #else2159 int c = classifications[0][pcount];2160 #endif2161 int b = r->residue_books[c][pass];2162 if (b >= 0) {2163 Codebook *book = f->codebooks + b;2164 if (!codebook_decode_deinterleave_repeat(f, book, residue_buffers, ch, &c_inter, &p_inter, n, r->part_size))2165 goto done;2166 } else {2167 z += r->part_size;2168 c_inter = 0;2169 p_inter = z;2170 }2171 }2172 #ifndef STB_VORBIS_DIVIDES_IN_RESIDUE2173 ++class_set;2174 #endif2175 }2176 } else {2177 while (pcount < part_read) {2178 int z = r->begin + pcount*r->part_size;2139 int c_inter = z % ch, p_inter = z/ch;2140 if (pass == 0) {2141 Codebook *c = f->codebooks+r->classbook;2142 int q;
3334 unmodified lines