ソースを参照

Merge pull request #40 from myint/division

Use correct integer division
Matthew Wang 11 年 前
コミット
0c9f80852d
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1
    1
      cdiff.py

+ 1
- 1
cdiff.py ファイルの表示

508
                 # [terminal size minus the line number columns and 3 separating
508
                 # [terminal size minus the line number columns and 3 separating
509
                 # spaces
509
                 # spaces
510
                 #
510
                 #
511
-                width = (terminal_size()[0] - num_width * 2 - 3) / 2
511
+                width = (terminal_size()[0] - num_width * 2 - 3) // 2
512
             except Exception:
512
             except Exception:
513
                 # If terminal detection failed, set back to default
513
                 # If terminal detection failed, set back to default
514
                 width = 80
514
                 width = 80