Fixed specifier mistaches.
This commit is contained in:
@@ -235,7 +235,7 @@ FILE *load_activities(char *dir_path, char *file_path, activity *activities, U32
|
||||
char activity_name[64];
|
||||
U64 lower;
|
||||
U64 upper;
|
||||
int l = sscanf(line, "%s %llu %llu", activity_name, &lower, &upper);
|
||||
int l = sscanf(line, "%s %lu %lu", activity_name, &lower, &upper);
|
||||
if(l != 3)
|
||||
continue;
|
||||
|
||||
@@ -274,7 +274,7 @@ void save_activities(FILE *f, char *file_path, U32 current_activity, activity *a
|
||||
if(f) {
|
||||
local_persist char write_buffer[128];
|
||||
for(U32 i = 0; i <= current_activity; i++) {
|
||||
snprintf(write_buffer, sizeof(write_buffer), "%s %llu %llu\n", activity_type_string_representation[activities[i].type], activities[i].began, activities[i].ended);
|
||||
snprintf(write_buffer, sizeof(write_buffer), "%s %lu %lu\n", activity_type_string_representation[activities[i].type], activities[i].began, activities[i].ended);
|
||||
|
||||
size_t write_buffer_len = strlen(write_buffer);
|
||||
if(fwrite(write_buffer, 1, write_buffer_len, f) != write_buffer_len) {
|
||||
@@ -441,7 +441,7 @@ S32 main(int argc, char *argv[])
|
||||
|
||||
for(U32 i = 0; i < activity_type_COUNT; i ++) {
|
||||
Hours time = break_time(activities_stats[i].total_seconds);
|
||||
snprintf(activities_stats[i].seconds_str, sizeof(activities_stats[i].seconds_str), "%02llu:%02llu:%02llu", time.hours, time.minutes, time.seconds);
|
||||
snprintf(activities_stats[i].seconds_str, sizeof(activities_stats[i].seconds_str), "%02lu:%02lu:%02lu", time.hours, time.minutes, time.seconds);
|
||||
|
||||
Rectangle rect = { (padding_x*(i+1))+(width*i), 100, width, (state.window_h-110) };
|
||||
// TOOD: This should be its own component.
|
||||
@@ -477,7 +477,7 @@ S32 main(int argc, char *argv[])
|
||||
|
||||
local_persist char buffer[24];
|
||||
Hours time = break_time(activities[i].ended - activities[i].began);
|
||||
snprintf(buffer, sizeof(buffer), "%02llu:%02llu:%02llu", time.hours, time.minutes, time.seconds);
|
||||
snprintf(buffer, sizeof(buffer), "%02lu:%02lu:%02lu", time.hours, time.minutes, time.seconds);
|
||||
|
||||
// TODO: Display the popup under cursor instead.
|
||||
DrawTextEx(state.font, str_activity_type, (Vector2){ start_x + 5.0f, 40.0f + 5.0f }, state.font_size - 5.0f, 2, WHITE);
|
||||
|
||||
Reference in New Issue
Block a user