aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSan Jacobs2022-08-07 08:13:49 +0200
committerSan Jacobs2022-08-07 08:13:49 +0200
commit8d8848e882aaf8ed92a9e919505f478ff1f5ce05 (patch)
tree64521a9b8db3eda847d729edbcabb1785e632909
parentf850a8e5b64f7018f594b8aa36511caeab00d929 (diff)
downloadsatscalc-8d8848e882aaf8ed92a9e919505f478ff1f5ce05.tar.gz
satscalc-8d8848e882aaf8ed92a9e919505f478ff1f5ce05.tar.bz2
satscalc-8d8848e882aaf8ed92a9e919505f478ff1f5ce05.zip
Fixed windows-only out_of_range crash
-rwxr-xr-xsrc/time.cpp4
-rwxr-xr-xsrc/time.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/time.cpp b/src/time.cpp
index 6d1401d..f54237f 100755
--- a/src/time.cpp
+++ b/src/time.cpp
@@ -10,8 +10,8 @@
// --- OPERATOR OVERLOADS ---
//
-long sortable_time(const moment input_moment) {
- return stol(std::to_string(input_moment.year)+
+long long sortable_time(const moment input_moment) {
+ return stoll(std::to_string(input_moment.year)+
padint(input_moment.month,2)+
padint(input_moment.day,2)+
padint(input_moment.hours,2)+
diff --git a/src/time.h b/src/time.h
index 637b111..ba803bd 100755
--- a/src/time.h
+++ b/src/time.h
@@ -98,7 +98,7 @@ std::string timeprint(const moment input_moment);
std::string timeprint(const moment input_moment, bool clockonly);
std::string timeprint(const timeblock input_timeblock);
std::string timeprint(const timeblock input_timeblock, bool clockonly);
-long sortable_time(const timeblock input_timeblock);
+long long sortable_time(const timeblock input_timeblock);
moment timeinput(moment input_moment);
moment timeinput();