Ticket #1948: ab.diff

File ab.diff, 712 bytes (added by pavlinux, 15 years ago)
  • src/viewer/inlines.h

    diff --git a/src/viewer/inlines.h b/src/viewer/inlines.h
    index 224f8e6..6538720 100644
    a b  
    1616static inline off_t 
    1717mcview_offset_doz (off_t a, off_t b) 
    1818{ 
    19     return (a >= b) ? a - b : 0; 
     19    return (b < a) ? (a - b) : 0; 
    2020} 
    2121 
    2222/* --------------------------------------------------------------------------------------------- */ 
    mcview_offset_rounddown (off_t a, off_t b) 
    3434static inline screen_dimen 
    3535mcview_dimen_doz (screen_dimen a, screen_dimen b) 
    3636{ 
    37     return (a >= b) ? a - b : 0; 
     37    return (b < a) ? a - b : 0; 
    3838} 
    3939 
    4040/* --------------------------------------------------------------------------------------------- */