summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-08-16 15:22:36 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-08-16 15:22:36 +0200
commitb2a5ae0b5b628cca712bb80d485393800de34172 (patch)
treeb7e2e5afe7bbca1d6985762c7244ff9af5cc46c4 /src
parentf0fc9fa21ad9efa47556d7a03aa2b13081028ac6 (diff)
refactor of administration api
Diffstat (limited to 'src')
-rw-r--r--src/ui/ui_contacts.cpp2
-rw-r--r--src/ui/ui_invoices.cpp6
-rw-r--r--src/ui/ui_settings.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/ui_contacts.cpp b/src/ui/ui_contacts.cpp
index 87c021d..4db726d 100644
--- a/src/ui/ui_contacts.cpp
+++ b/src/ui/ui_contacts.cpp
@@ -16,7 +16,7 @@ void ui_draw_address_form(address* buffer)
const char* selected_country = NULL;
float widthAvailable = ImGui::GetContentRegionAvail().x;
- char id[128];
+ char id[MAX_LEN_ADDRESS];
ImGui::SetNextItemWidth(widthAvailable*0.5f);
snprintf(id, sizeof(id), "%s##%p", localize("contact.form.address1"), buffer);
diff --git a/src/ui/ui_invoices.cpp b/src/ui/ui_invoices.cpp
index acf0de7..0256fbd 100644
--- a/src/ui/ui_invoices.cpp
+++ b/src/ui/ui_invoices.cpp
@@ -87,7 +87,7 @@ void draw_tax_bracket_selector(char* tax_bracket_id)
}
if (selected_tax_bracket_index != -1) {
- strops_copy(tax_bracket_id, buffer[selected_tax_bracket_index].id, 16);
+ strops_copy(tax_bracket_id, buffer[selected_tax_bracket_index].id, MAX_LEN_ID);
}
}
@@ -180,7 +180,7 @@ void draw_costcenter_selector(char* costcenter_id)
}
if (selected_costcenter_index != -1) {
- strops_copy(costcenter_id, buffer[selected_costcenter_index].id, 16);
+ strops_copy(costcenter_id, buffer[selected_costcenter_index].id, MAX_LEN_ID);
}
}
@@ -219,7 +219,7 @@ void draw_project_selector(char* project_id)
}
if (selected_project_index != -1) {
- strops_copy(project_id, buffer[selected_project_index].id, 16);
+ strops_copy(project_id, buffer[selected_project_index].id, MAX_LEN_ID);
}
free(buffer);
diff --git a/src/ui/ui_settings.cpp b/src/ui/ui_settings.cpp
index a7759aa..69c4f54 100644
--- a/src/ui/ui_settings.cpp
+++ b/src/ui/ui_settings.cpp
@@ -50,7 +50,7 @@ static void ui_draw_vat_rates()
ImGui::TableSetupColumn(localize("settings.vat.table.rates"));
// Used to generate headers for each individual country.
- char prev_country[3];
+ char prev_country[MAX_LEN_COUNTRY_CODE];
prev_country[0] = 0;
for (u32 i = 0; i < tax_bracket_count; i++) {