MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / read_bstring

Function read_bstring

src/debug.cpp:9441–9462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9439static int debugsprintf_mode;
9440
9441static void read_bstring(char *out, int max, uae_u32 addr)
9442{
9443 out[0] = 0;
9444 if (!valid_address(addr, 1))
9445 return;
9446 uae_u8 l = get_byte(addr);
9447 if (l > max)
9448 l = max;
9449 addr++;
9450 for (int i = 0; i < l && i < max; i++) {
9451 uae_u8 c = 0;
9452 if (valid_address(addr, 1)) {
9453 c = get_byte(addr);
9454 }
9455 if (c == 0) {
9456 c = '.';
9457 }
9458 addr++;
9459 out[i] = c;
9460 out[i + 1] = 0;
9461 }
9462}
9463
9464static void read_string(char *out, int max, uae_u32 addr)
9465{

Callers 1

debug_sprintf_doFunction · 0.85

Calls 2

get_byteFunction · 0.85
valid_addressFunction · 0.70

Tested by

no test coverage detected