X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2Funpack.c;h=8568b89e484b0f89e170694af4c470553907ab4a;hb=b647e4eb105d00bdbf2c8e39b5ae3cf7700c08aa;hp=a2cc44d9ebd2ae695a1b19c7cc3910701731189d;hpb=0cca0c495c7dc29d134a10d7eed5de1f377c99bf;p=lugaru.git diff --git a/Source/unpack.c b/Source/unpack.c index a2cc44d..8568b89 100644 --- a/Source/unpack.c +++ b/Source/unpack.c @@ -36,9 +36,11 @@ void vsunpackf(const void *buffer, const char *format, va_list args) BinIOInitFormatCursor(&cursor, format); context.data = (const unsigned char*)buffer; - context.args = args; + va_copy(context.args, args); while (BinIONextChar(&context, &cursor, BinIOUnpack)) {} + + va_end(context.args); } void vfunpackf(FILE *file, const char *format, va_list args)