Why does this piece of code throw an exception when I try to change a character in the string
void reverseString(char *s)
{
    int e = strlen(s) - 1;
    int b = 0;
    char t1,t2;
    while(b < e)
    {
        t1 = s[b];
        t2 = s[e];
        s[b] = t2;
        s[e] = t1;
        b++;
        e--;
    }
} 
 
     
     
     
    