1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 09:27:35 +00:00

base64: Fix not outputting all decoded data

It would use printf to output the data, so if it contains a null
terminator it'll stop.
This commit is contained in:
BenJilks 2020-10-18 14:35:55 +00:00 committed by Andreas Kling
parent 29ada654b1
commit 91b2af34e1

View file

@ -71,7 +71,7 @@ int main(int argc, char** argv)
if (decode) {
auto decoded = decode_base64(StringView(buffer));
printf("%s\n", String::copy(decoded).characters());
fwrite(decoded.data(), sizeof(u8), decoded.size(), stdout);
return 0;
}