History

lua: fix guard against division by 0

This was incorrectly converted from the original C code. Change it to what the original code used.

wm4 committed 6 years ago

Commit 091ee9d1 parent d951a7f1 file · +1 −1Browse files

Showing the changes to player/lua/defaults.lua (1 of 1 file). Show all

Unified · Split

player/lua/defaults.lua+1−1
@@ -645,7 +645,7 @@ function mp.get_osd_size() · 644 unmodified lines
645645 par = 1
646646 end
647647
648− local aspect = 1.0 * w / math.max(h) / par
648+ local aspect = 1.0 * w / math.max(h, 1.0) / par
649649 return w, h, aspect
650650 end
651651

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t