Mercurial > hg > dmlib
diff dmres.c @ 4:e0fc7863d024
Mask out bits from resFlags that should not be there after initialization.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 28 Sep 2012 03:45:02 +0300 |
parents | 32250b436bca |
children | 2f463a59d732 |
line wrap: on
line diff
--- a/dmres.c Fri Sep 28 02:24:40 2012 +0300 +++ b/dmres.c Fri Sep 28 03:45:02 2012 +0300 @@ -783,7 +783,7 @@ // Initialize resources from a PACK file for (node = dfResPackFile->entries; node != NULL; node = node->next) { - DMResource *res = dmres_new(node->filename, node->resFlags, node->size); + DMResource *res = dmres_new(node->filename, node->resFlags & DMF_MASK, node->size); if (res == NULL) { dmError("Could not allocate memory for resource node '%s' [0x%08x], %d.\n", @@ -878,7 +878,7 @@ if (dfPreload != NULL) { - if (dfPreload->flags & DMF_PRELOAD) + if ((dfPreload->flags & DMF_PRELOAD) && (dfPreload->flags & DMF_LOADED) == 0) { (*loaded)++; }