Skip to content

Commit 9ac9f6e

Browse files
committed
fixed copy paste issue in string memory allocation docs
1 parent 17e4a91 commit 9ac9f6e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • _docs/tutorials/advanced/handling_type_memory

_docs/tutorials/advanced/handling_type_memory/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ mypackage__msg__MyType mymsg;
135135

136136
// Assigning dynamic memory to the frame_id char sequence
137137
mymsg.header.frame_id.capacity = 100;
138-
mymsg.header.frame_id.data = (char*) malloc(mymsg.values.capacity * sizeof(char));
138+
mymsg.header.frame_id.data = (char*) malloc(mymsg.header.frame_id.capacity * sizeof(char));
139139
mymsg.header.frame_id.size = 0;
140140

141141
// Assigning value to the frame_id char sequence

0 commit comments

Comments
 (0)