Merge "Fix error checking in append_string"
am: e2e2b2d3d3

Change-Id: Ica7e466b74db7f7927ec9855b8a119b454cbc996
diff --git a/libstats/socket/stats_event.c b/libstats/socket/stats_event.c
index 551b392..15039c6 100644
--- a/libstats/socket/stats_event.c
+++ b/libstats/socket/stats_event.c
@@ -141,7 +141,7 @@
 // Side-effect: modifies event->errors if buf is not properly null-terminated
 static void append_string(struct stats_event* event, const char* buf) {
     size_t size = strnlen(buf, MAX_EVENT_PAYLOAD);
-    if (event->errors) {
+    if (size == MAX_EVENT_PAYLOAD) {
         event->errors |= ERROR_STRING_NOT_NULL_TERMINATED;
         return;
     }