diff options
author | Stefan Zabka <zabkaste@hu-berlin.de> | 2020-05-21 17:46:10 +0200 |
---|---|---|
committer | Stefan Zabka <zabkaste@hu-berlin.de> | 2020-05-21 17:46:10 +0200 |
commit | 45b35365a5d0f895caeb6178f5f0a70cfe4464ee (patch) | |
tree | bc291ece0cf297f50ba48e8d874a2145721a445f /02_exercise/prompt_utils.c | |
parent | 0465e79da49900bbd66216d979876654f8977e30 (diff) | |
parent | 8da59918c22df70eaec28150867c7e8bfd4bc1ae (diff) | |
download | betriebssysteme-45b35365a5d0f895caeb6178f5f0a70cfe4464ee.tar.gz betriebssysteme-45b35365a5d0f895caeb6178f5f0a70cfe4464ee.zip |
Merge branch 'master' of git.niklashalle.net:uni/sem6/betriebssysteme
Diffstat (limited to '02_exercise/prompt_utils.c')
-rw-r--r-- | 02_exercise/prompt_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/02_exercise/prompt_utils.c b/02_exercise/prompt_utils.c index b7c836b..d43a6b6 100644 --- a/02_exercise/prompt_utils.c +++ b/02_exercise/prompt_utils.c @@ -58,7 +58,7 @@ char const *relative_path(char const *const from_dir, char const *const to_dir) } else { char const *const go_up = "/.."; size_t length = strlen(to_dir + common_position) + strlen("..") + - strlen(go_up) * (levels_up - 1); + strlen(go_up) * (levels_up - 1) + 1; return_value = malloc(length * sizeof(char)); strcpy(return_value, ".."); for (size_t j = 0; j < levels_up - 1; ++j) { |