Commit 74b339e0 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

Merge branch...

Merge branch '2191-ref-port-mr-2293-from-float-fix-for-crash-in-debug-mode-in-macos-when-reading' into 'ivas-float-update'

Port 411 - MR 2293 - REF - Fix for crash in debug mode in macos when reading windows style line ending"

See merge request !2515
parents eb6c67f4 60dd9f8f
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -185,16 +185,18 @@ void convert_backslash(
void remove_cr(
    char *str )
{
    char *pos;
    int32_t n, p = 0;

    /* remove all \r characters from the string */
    pos = strchr( str, '\r' );
    while ( pos != NULL )
    for ( n = 0; str[n] != 0; n++ )
    {
        strcpy( pos, pos + 1 );
        pos = strchr( pos, '\r' );
        char c = str[n];
        str[p] = c;
        p += ( c == '\r' ) ? 0 : 1;
    }

    str[p] = 0;

    return;
}