Fix bug of strcpy to wrong place during realloc

This commit is contained in:
Aoran Zeng
2023-09-02 23:11:22 +08:00
parent 1d34248a1e
commit 251ea5c827
3 changed files with 22 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
CFLAGS =
TARGET = chsrc
TEST_TARGET = test_$(TARGET)
#=======================
all:
@@ -8,8 +9,8 @@ all:
@gcc chsrc.c $(CFLAGS) -o $(TARGET)
test:
@gcc test_helper.c -o test
@./test
@gcc test_helper.c -o $(TEST_TARGET)
@./$(TEST_TARGET)
test_cmd: $(TARGET)
./$(TARGET) list mirror