[Bug Fix] Fix Beastlord Warder Size Modifier (#4665)

* [Bug Fix] Fix Beastlord Warder Size Modifier

* Push

* Update repository-generator.pl

---------

Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
Alex King
2025-02-11 22:27:59 -05:00
committed by GitHub
parent 59292b15f6
commit c228604255
2 changed files with 7 additions and 0 deletions
@@ -335,6 +335,10 @@ foreach my $table_to_generate (@tables) {
$all_entries .= sprintf("\t\t\te.%-${longest_column_length}s = row[%s] ? static_cast<%s>(strtoul(row[%s], nullptr, 10)) : %s;\n", $column_name_formatted, $index, $struct_data_type, $index, $default_value);
$find_one_entries .= sprintf("\t\t\te.%-${longest_column_length}s = row[%s] ? static_cast<%s>(strtoul(row[%s], nullptr, 10)) : %s;\n", $column_name_formatted, $index, $struct_data_type, $index, $default_value);
}
elsif ($data_type =~ /float|decimal/) {
$all_entries .= sprintf("\t\t\te.%-${longest_column_length}s = row[%s] ? (strtof(row[%s], nullptr) > 0.0f ? strtof(row[%s], nullptr) : %s) : %s;\n", $column_name_formatted, $index, $index, $index, $default_value, $default_value);
$find_one_entries .= sprintf("\t\t\te.%-${longest_column_length}s = row[%s] ? (strtof(row[%s], nullptr) > 0.0f ? strtof(row[%s], nullptr) : %s) : %s;\n", $column_name_formatted, $index, $index, $index, $default_value, $default_value);
}
}
elsif ($data_type =~ /bigint/) {
$all_entries .= sprintf("\t\t\te.%-${longest_column_length}s = row[%s] ? strtoll(row[%s], nullptr, 10) : %s;\n", $column_name_formatted, $index, $index, $default_value);