From c2ab55e2d09ffa32107681e1933dac462264bc8c Mon Sep 17 00:00:00 2001 From: Chris Teubert Date: Fri, 24 Apr 2015 11:00:53 -0700 Subject: [PATCH] Fix sendTEXT bug sendText using the number 40 instead of message length in sendUDP call. Messages would be cut off if longer than this --- C/src/xplaneConnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/src/xplaneConnect.c b/C/src/xplaneConnect.c index 1831929..9e7ba5b 100755 --- a/C/src/xplaneConnect.c +++ b/C/src/xplaneConnect.c @@ -651,7 +651,7 @@ int sendTEXT(XPCSocket sock, char* msg, int x, int y) strncpy(buffer + 14, msg, msgLen); // Send Command - if (sendUDP(sock, buffer, 40) < 0) + if (sendUDP(sock, buffer, len) < 0) { printError("sendTEXT", "Failed to send command"); return -3;