Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
A few more Visual Studio warning fixes.
  • Loading branch information
icculus committed May 27, 2016
1 parent d1ed419 commit 9935e14
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mojoshader.c
Expand Up @@ -12050,7 +12050,7 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf,
void *d)
{
// !!! FIXME: This is copypasta ripped from parse_preshader -flibit
int i;
unsigned int i;

// All sections of a preshader are packed into separate comment tokens,
// inside the containing comment token block. Find them all before
Expand All @@ -12060,6 +12060,8 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf,
PreshaderBlockInfo fxlc = { 0, 0, 0 };
PreshaderBlockInfo clit = { 0, 0, 0 };

CtabData ctabdata = { 0, 0, 0 };

const uint32 *tokens = (const uint32 *) buf;
uint32 tokcount = _len / 4;

Expand Down Expand Up @@ -12190,7 +12192,6 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf,
}

// Now we'll figure out the CTAB...
CtabData ctabdata = { 0, 0, 0 };
parse_constant_table(&fillerContext, ctab.tokens - 1, ctab.tokcount * 4,
version, 0, &ctabdata);

Expand Down Expand Up @@ -12297,7 +12298,7 @@ const MOJOSHADER_preshader *MOJOSHADER_parsePreshader(const unsigned char *buf,
case 2: // item from ctabdata.
{
MOJOSHADER_symbol *sym = ctabdata.symbols;
for (i = 0; i < ctabdata.symbol_count; i++, sym++)
for (i = 0; i < (unsigned int) ctabdata.symbol_count; i++, sym++)
{
const uint32 base = sym->register_index * 4;
const uint32 count = sym->register_count * 4;
Expand Down

0 comments on commit 9935e14

Please sign in to comment.