https://github.com/libsdl-org/Maelstrom/commit/30d9c1657c3e06cb3da48546d15c4514c8539acd
From 30d9c1657c3e06cb3da48546d15c4514c8539acd Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Tue, 8 Nov 2011 02:32:44 -0500
Subject: [PATCH] Fixed a crash when the name is empty.
---
netlogic/packet.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/netlogic/packet.h b/netlogic/packet.h
index 3a62118a..30ce17de 100644
--- a/netlogic/packet.h
+++ b/netlogic/packet.h
@@ -85,6 +85,10 @@ class DynamicPacket : public UDPpacket
pos += sizeof(value);
}
void Write(const char *value) {
+ if (!value) {
+ value = "";
+ }
+
size_t len = SDL_strlen(value);
if (len > 255) {
len = 255;