From fde3b70d038c2d22b2b03dbd8ea9a981a8898654 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Fri, 28 Jun 2019 23:44:09 +0200 Subject: [PATCH] Fix info os cfwversion/memory by adding null terminator to xml files (thanks @fincs) --- sysmodules/rosalina/source/gdb/net.c | 2 +- .../gdb/xml/osdata_cfw_version_template.xml | Bin 240 -> 241 bytes .../source/gdb/xml/osdata_memory_template.xml | Bin 804 -> 805 bytes 3 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sysmodules/rosalina/source/gdb/net.c b/sysmodules/rosalina/source/gdb/net.c index bcd984d..b328b4b 100644 --- a/sysmodules/rosalina/source/gdb/net.c +++ b/sysmodules/rosalina/source/gdb/net.c @@ -320,7 +320,7 @@ int GDB_SendStreamData(GDBContext *ctx, const char *streamData, u32 offset, u32 if((forceEmptyLast && offset >= totalSize) || (!forceEmptyLast && offset + length >= totalSize)) { - length = totalSize - offset; + length = offset >= totalSize ? 0 : totalSize - offset; buf[0] = 'l'; memcpy(buf + 1, streamData + offset, length); return GDB_SendPacket(ctx, buf, 1 + length); diff --git a/sysmodules/rosalina/source/gdb/xml/osdata_cfw_version_template.xml b/sysmodules/rosalina/source/gdb/xml/osdata_cfw_version_template.xml index f0e63f0a083350e667a00f67edee0e43af960463..dc877c2a2c01e678b52fea62dd53a96703d614ee 100644 GIT binary patch delta 8 Pcmeys_>pnK2Sx?}5=;YS delta 6 Ncmey!_