请问以下一段代码在Dev-C++上运行直接崩溃是什么原因

代码来源C和指针课后答案6.2,增加主函数

#include<stdio.h>
#define NUL '\0'
#define TRUE 1
#define FALSE 0
int del_substr(char *str,char const *substr);
int main(void)
{
    char *str="abcdefg";
    char const *substr="de";
    int a;
    a=del_substr(str,substr);
    printf("%d",a);
    return 0;
}
char *match(char *str,char const *want)
{
    while(*want!=NUL)
        if(*str++ != *want++)
            return NULL;
    return str;
}
int del_substr(char *str,char const *substr)
{
    char *next;
    while(*str!=NUL)
    {
        next=match(str,substr);
        if(next!=NULL)
            break;
        str++;

    }

    if(*str==NUL)
        return FALSE;
    while(*str++ = *next++)
        ;
    return TRUE;
}

while(*str++ = *next++)
你这里有赋值操作

char *str="abcdefg";
char const *substr="de";

这里都是常量,只读的