In the following code, what am I doing wrong? I run the code in eclipse and using MinGW C compiler. When I run it eclipse stops responding. When I debug the code, it breaks on the line
*start = *end;
I verified the value of *start and *end in debug mode and none is null.
void func1(char *str)
{
    char *end, *start;
    end = start = str;
    char tmp;
    if (str)
    {
        while (*end)
            ++end;
        --end;
        while (start < end) 
        {
            tmp = *start;
            *start = *end;
            *end = tmp;
            start++;
            end--;
        }
    }
}
Any tips/ideas?
 
    