Replace spaces in string parsing with non-printable 0x7F for correct passthrough in radio

This commit is contained in:
Ed Gonzalez 2015-03-12 14:53:51 -05:00
parent 637e3376a0
commit 5cd5b63b7e
5 changed files with 27 additions and 2 deletions

View file

@ -140,3 +140,19 @@ void printIP(uint32 ip)
output("%d.%d.%d.%d\n",((ip>>24)& 0xFF),((ip>>16)& 0xFF),((ip>>8)& 0xFF),(ip & 0xFF));
}
void charReplace( char * string, char oldChar, char newChar )
{
if ( string == NULL ) {
output("Null string passed to charReplace\n");
return ;
}
while (*string != 0 ) {
if ( *string == oldChar )
*string = newChar;
string++;
}
}