MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / runtime_bounded_length

Function runtime_bounded_length

src/daemon/runtime.c:411–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

409}
410
411static bool runtime_bounded_length(const char *value, size_t capacity, size_t *length_out) {
412 if (!value || capacity == 0) {
413 return false;
414 }
415 for (size_t i = 0; i < capacity; i++) {
416 if (value[i] == '\0') {
417 if (length_out) {
418 *length_out = i;
419 }
420 return true;
421 }
422 }
423 return false;
424}
425
426static bool runtime_wire_string_encode(uint8_t *out, size_t capacity, const char *value,
427 bool allow_empty) {

Calls

no outgoing calls

Tested by

no test coverage detected