Skip to content

Commit

Permalink
get rid of condition again
Browse files Browse the repository at this point in the history
  • Loading branch information
Rekt3421 committed Oct 7, 2024
1 parent 39dda98 commit 9c25fbe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/printf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,8 @@ void process_printf(char*& data, const printf_descriptor_map_t& descs,
// Special case for %s
if (get_fmt_conversion(part_fmt) == 's') {
uint32_t string_id = read_buff<uint32_t>(data);
if (string_id < descs.size()) {
printf_out << print_part(
part_fmt, descs.at(string_id).format_string.c_str(),
size);
}
printf_out << print_part(
part_fmt, descs.at(string_id).format_string.c_str(), size);
} else {
printf_out << print_part(part_fmt, data, size);
}
Expand Down

0 comments on commit 9c25fbe

Please sign in to comment.