Skip to content

Commit

Permalink
vmpu: Include the terminating-null in the bytes copied count
Browse files Browse the repository at this point in the history
Previously, vmpu_box_namespace_from_id would not include the
terminating-null in the bytes copied count it would return. We now include
the terminating-null in the bytes copied count.
  • Loading branch information
Patater committed Mar 7, 2016
1 parent 0c38f08 commit 57de15f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/system/src/mpu/vmpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ static int copy_box_namespace(const char *src, char *dst)

if (src[bytes_copied] == '\0') {
/* We've reached the end of the box namespace. */
++bytes_copied; /* Include the terminating-null in bytes_copied. */
goto done;
}
}
Expand Down

0 comments on commit 57de15f

Please sign in to comment.