fix proxspace breaking

This commit is contained in:
iceman1001 2022-06-15 18:48:36 +02:00
commit 6118b11a3e

View file

@ -3073,7 +3073,7 @@ static int CmdDiff(const char *Cmd) {
if (diff == 0) { if (diff == 0) {
hex_to_buffer((uint8_t *)line, inA + i, width, sizeof(line), 0, 1, true); hex_to_buffer((uint8_t *)line, inA + i, width, sizeof(line), 0, 1, true);
ascii_to_buffer((uint8_t *)(line + strlen(line)), inA + i, width, width, 0); ascii_to_buffer((uint8_t *)(line + strlen(line)), inA + i, width, width, 0);
strncat(line + strlen(line), " | ", 3); strncat(line + strlen(line), " | ", sizeof(line) - strlen(line));
hex_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, sizeof(line), 0, 1, true); hex_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, sizeof(line), 0, 1, true);
ascii_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, width, 0); ascii_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, width, 0);
} else { } else {
@ -3141,20 +3141,20 @@ static int CmdDiff(const char *Cmd) {
ascii_to_buffer((uint8_t *)(line + strlen(line)), inA + i, width, sizeof(line), 0); ascii_to_buffer((uint8_t *)(line + strlen(line)), inA + i, width, sizeof(line), 0);
strcat(line + strlen(line), " | "); strcat(line + strlen(line), " | ");
for (int j = 0; j < width; j++) { for (int j = 0; j < width; j++) {
strncat(line + strlen(line), "-- ", 3); strncat(line + strlen(line), "-- ", sizeof(line) - strlen(line));
} }
for (int j = 0; j < width; j++) { for (int j = 0; j < width; j++) {
strncat(line + strlen(line), ".", 1); strncat(line + strlen(line), ".", sizeof(line) - strlen(line));
} }
} else { } else {
for (int j = 0; j < width; j++) { for (int j = 0; j < width; j++) {
strncat(line + strlen(line), "-- ", 3); strncat(line + strlen(line), "-- ", sizeof(line) - strlen(line));
} }
for (int j = 0; j < width; j++) { for (int j = 0; j < width; j++) {
strncat(line + strlen(line), ".", 1); strncat(line + strlen(line), ".", sizeof(line) - strlen(line));
} }
strncat(line + strlen(line), " | ", 3); strncat(line + strlen(line), " | ", sizeof(line) - strlen(line));
hex_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, sizeof(line), 0, 1, true); hex_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, sizeof(line), 0, 1, true);
ascii_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, sizeof(line), 0); ascii_to_buffer((uint8_t *)(line + strlen(line)), inB + i, width, sizeof(line), 0);
} }