Skip to content

Commit

Permalink
modify seed to avoid overflow error
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufmte committed Sep 14, 2022
1 parent b1e522f commit 8ecfb49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/displayapp/screens/Dice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static void btnRollEventHandler(lv_obj_t* obj, lv_event_t event) {

Dice::Dice(DisplayApp* app, Controllers::DateTime& dateTime) : Screen(app) {

srand(dateTime.Uptime().count() * time(nullptr));
srand(time(nullptr) - dateTime.Uptime().count());

lv_obj_t* dLabel = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(dLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);
Expand Down

0 comments on commit 8ecfb49

Please sign in to comment.