I get some strange result with strrchr. please help me.

Here is my code:

```
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{

    char szString[32] = "hello-world-and-everyone";
    char* ptemp = NULL;
    ptemp = strrchr(szString, '-');
    if (ptemp == NULL)
    {
        printf("Invalid string\n");
        return 1;
    }
    printf("%s\n", szString);
    printf("%s\n", ptemp );
    *ptemp = 0; 
    printf("%s\n", szString);
    return 0;
}

```

Expected result:

```
hello-world-and-everyone
-everyone
hello-world-and-everyone

```

Acutal result:

```
hello-world-and-everyone
-everyone
hello-world-and

```