diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-02-27 20:51:35 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-02-27 20:51:35 +0000 |
commit | 1102dfd4322d9a62fb38c83aa70857ac29f171ef (patch) | |
tree | 1e584a2b873f4bb7e4998bb2dd92a14880f0abe5 /wk4/lect/copy.c | |
parent | b8deb77c1d86870810a2b07cafb9cae068fddd84 (diff) |
Tue, Feb 27, 2024, 12:51 PM -08:00
Diffstat (limited to 'wk4/lect/copy.c')
-rw-r--r-- | wk4/lect/copy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wk4/lect/copy.c b/wk4/lect/copy.c index 470340a..4d442c5 100644 --- a/wk4/lect/copy.c +++ b/wk4/lect/copy.c @@ -9,6 +9,10 @@ int main(void) char *s = get_string("s: "); char *t = malloc(strlen(s) + 1); + if (t == NULL) + { + return 1; + } for (int i = 0, n = strlen(s); i <= n; i++) { |