MCPcopy Create free account
hub / github.com/WheretIB/nullc / SafeSprintf

Function SafeSprintf

NULLC/StrAlgo.cpp:50–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int SafeSprintf(char* dst, size_t size, const char* src, ...)
51{
52 va_list args;
53 va_start(args, src);
54
55 int result = vsnprintf(dst, size, src, args);
56 dst[size-1] = '\0';
57 return (result == -1 || (size_t)result >= size) ? (int)size : result;
58}

Callers 15

RunMethod · 0.70
StopMethod · 0.70
GetResultMethod · 0.70
AddBreakpointMethod · 0.70
RemoveBreakpointMethod · 0.70
ConvertFunctionToPointerFunction · 0.70
FunctionEndFunction · 0.70
AddMemberFunctionCallFunction · 0.70
ThrowFunctionSelectErrorFunction · 0.70
AddFunctionCallNodeFunction · 0.70
TypeFinishFunction · 0.70

Calls

no outgoing calls

Tested by 4

RunTestsFunction · 0.40
RunParseFailTestsFunction · 0.40
RunMethod · 0.40
RunMethod · 0.40