Important Update:
- Remove unused: FunctionCore-ChannelBuffer - DataTreeCore: - Bug fix: Set Len=0 on element Clear() - SelectableBare/Core: - Move move BuildArgs() to SelectableBare - Make OutputHandle() to virtual method - UtilCore: - Bug fix: Handle NoCrLF correctly in BytesToSafeStr()
This commit is contained in:
@@ -40,7 +40,10 @@ char * BytesToSafeStr( const char * Bytes, const int Len, const bool NoCrLf, con
|
||||
|
||||
// Remove special char
|
||||
for (int i=0; i<Len; i++) {
|
||||
if (((Bytes[i] < 32) || (Bytes[i] > 126)) ||
|
||||
if ((Bytes[i] == '\r') || (Bytes[i] == '\n')) {
|
||||
*BufPos = (NoCrLf)? SpecChar : Bytes[i];
|
||||
}
|
||||
else if (((Bytes[i] < 32) || (Bytes[i] > 126)) ||
|
||||
(NoCrLf && ((Bytes[i] == '\r') || (Bytes[i] == '\n')))) {
|
||||
*BufPos = SpecChar;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user