From 88c1078ac746dc5927a65145b54c7da80002f888 Mon Sep 17 00:00:00 2001 From: jgromes Date: Tue, 16 Nov 2021 10:06:27 +0100 Subject: [PATCH] Added missing static macro guards (#407) --- src/protocols/RTTY/RTTY.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocols/RTTY/RTTY.cpp b/src/protocols/RTTY/RTTY.cpp index 432a6453..95d11018 100644 --- a/src/protocols/RTTY/RTTY.cpp +++ b/src/protocols/RTTY/RTTY.cpp @@ -3,14 +3,18 @@ ITA2String::ITA2String(char c) { _len = 1; + #if !defined(RADIOLIB_STATIC_ONLY) _str = new char[1]; + #endif _str[0] = c; _ita2Len = 0; } ITA2String::ITA2String(const char* str) { _len = strlen(str); + #if !defined(RADIOLIB_STATIC_ONLY) _str = new char[_len + 1]; + #endif strcpy(_str, str); _ita2Len = 0; }