#include "game_types.h"

/* Bignum_InitWithDefaults @ 0x0801CA6C (real 42B) -- nullable-out bignum init flag probe. Mirrors src/matched/Bignum_InitWithDefaults.c. */
/* When out is NULL a scratch slot is used; a NULL src yields 0. Otherwise
   copies the source byte and reports nonzero, or -1 when flag is clear. */
int Bignum_InitWithDefaults(int unused, int *out, unsigned char *src, int flag)
{
    int scratch;
    (void)unused;
    if (out == 0)
        out = &scratch;
    if (src == 0)
        return 0;
    if (flag == 0)
        return -1;
    *out = *src;
    return *src != 0;
}
