mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix Mnemosyne importer chokes on due dates >= 2038 (#3459)
* Fix integer overflow * Update CONTRIBUTORS
This commit is contained in:
parent
159681d9f2
commit
cc45db0e22
3 changed files with 4 additions and 4 deletions
|
@ -187,7 +187,7 @@ Christian Donat <https://github.com/cdonat2>
|
|||
Asuka Minato <https://asukaminato.eu.org>
|
||||
Dillon Baldwin <https://github.com/DillBal>
|
||||
Voczi <https://github.com/voczi>
|
||||
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
||||
Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
|
||||
Themis Demetriades <themis100@outlook.com>
|
||||
Luke Bartholomew <lukesbart@icloud.com>
|
||||
Gregory Abrasaldo <degeemon@gmail.com>
|
||||
|
|
|
@ -635,9 +635,9 @@ impl ForeignCard {
|
|||
}
|
||||
|
||||
fn native_due(self, timing: &SchedTimingToday) -> i32 {
|
||||
let day_start = timing.next_day_at.0 as i32 - 86_400;
|
||||
let day_start = timing.next_day_at.0 - 86_400;
|
||||
let due_delta = (self.due - day_start) / 86_400;
|
||||
due_delta + timing.days_elapsed as i32
|
||||
due_delta as i32 + timing.days_elapsed as i32
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ pub struct ForeignNote {
|
|||
#[serde(default)]
|
||||
pub struct ForeignCard {
|
||||
/// Seconds-based timestamp
|
||||
pub due: i32,
|
||||
pub due: i64,
|
||||
/// In days
|
||||
pub interval: u32,
|
||||
pub ease_factor: f32,
|
||||
|
|
Loading…
Reference in a new issue