MCPcopy Create free account
hub / github.com/NetHack/NetHack / vconfig_error_add

Function vconfig_error_add

src/cfgfiles.c:1874–1890  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1872}
1873
1874staticfn void
1875vconfig_error_add(const char *str, va_list the_args)
1876{ /* start of vconf...() or of nested block in USE_OLDARG's conf...() */
1877 int vlen = 0;
1878 char buf[BIGBUFSZ]; /* will be chopped down to BUFSZ-1 if longer */
1879
1880 vlen = vsnprintf(buf, sizeof buf, str, the_args);
1881#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) && defined(DEBUG)
1882 if (vlen >= (int) sizeof buf)
1883 panic("%s: truncation of buffer at %zu of %d bytes",
1884 "config_error_add", sizeof buf, vlen);
1885#else
1886 nhUse(vlen);
1887#endif
1888 buf[BUFSZ - 1] = '\0';
1889 config_erradd(buf);
1890}
1891
1892#ifndef SFCTOOL
1893void

Callers 1

config_error_addFunction · 0.85

Calls 2

config_erraddFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected