Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit c1936b7

Browse files
author
Jérôme Lebel
committed
nicer code
1 parent 4086374 commit c1936b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bson/bson-iter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ bson_iter_utf8_len_unsafe (const bson_iter_t *iter)
114114
{
115115
int32_t val;
116116

117-
memcpy (&val, iter->raw + iter->d1, 4);
117+
memcpy (&val, iter->raw + iter->d1, sizeof (val));
118118
val = BSON_UINT32_FROM_LE (val);
119119
return MAX (0, val - 1);
120120
}

0 commit comments

Comments
 (0)