mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #940351 (Unable to convert RTF file to MOBI OR TXT -)
This commit is contained in:
parent
ec8cc249ca
commit
8e79ba6893
@ -54,6 +54,8 @@ class KeyMapper(object):
|
|||||||
endp = 0 if size < base else 36
|
endp = 0 if size < base else 36
|
||||||
diff = (abs(base - size) * 3) + ((36 - size) / 100)
|
diff = (abs(base - size) * 3) + ((36 - size) / 100)
|
||||||
logb = abs(base - endp)
|
logb = abs(base - endp)
|
||||||
|
if logb == 0:
|
||||||
|
logb = 1e-6
|
||||||
result = sign * math.log(diff, logb)
|
result = sign * math.log(diff, logb)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user