Skip to content

Commit e5e2f49

Browse files
Renyi Zhaosdroege
authored andcommitted
glib: Fix misuse of operator in subtract_days
1 parent bb6ea9a commit e5e2f49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

glib/src/date.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl Date {
274274
#[doc(alias = "g_date_subtract_days")]
275275
pub fn subtract_days(&mut self, n_days: u32) -> Result<(), BoolError> {
276276
let julian = self.julian();
277-
if julian > n_days {
277+
if julian < n_days {
278278
Err(bool_error!("invalid number of days"))
279279
} else {
280280
unsafe {

0 commit comments

Comments
 (0)