Skip to content

Commit ce35bed

Browse files
committed
Adapt to aws_base64_compute_encoded_len() no longer adding 1 extra for null terminator.
See: awslabs/aws-c-common#1188
1 parent 919874c commit ce35bed

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

source/Types.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,8 @@ namespace Aws
110110
return {};
111111
}
112112

113-
// encoding appends a null terminator, and accounts for it in the encoded length,
114-
// which makes the string 1 character too long
115-
if (outputStr.back() == 0)
116-
{
117-
outputStr.pop_back();
118-
}
113+
AWS_ASSERT(outputStr.length() == tempBuf.len);
114+
119115
return outputStr;
120116
}
121117
} // namespace Crt

0 commit comments

Comments
 (0)