minor: don't use strlen if we don't have to
This commit is contained in:
parent
33bfd2b33a
commit
bf2b906532
@ -991,9 +991,8 @@ static PyObject* get_value(const char* buffer, int* position, int type) {
|
||||
case 13:
|
||||
case 14:
|
||||
{
|
||||
int value_length;
|
||||
int value_length = ((int*)(buffer + *position))[0] - 1;
|
||||
*position += 4;
|
||||
value_length = strlen(buffer + *position);
|
||||
value = PyUnicode_DecodeUTF8(buffer + *position, value_length, "strict");
|
||||
if (!value) {
|
||||
return NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user