diff -r 4c7a353cf583 -r c8ecddbd99e9 src/partdownloader.cpp --- a/src/partdownloader.cpp Sat Jan 28 14:13:01 2017 +0200 +++ b/src/partdownloader.cpp Sat Jan 28 14:14:28 2017 +0200 @@ -106,8 +106,8 @@ // Remove the existing extension, if any. It may be we're here over a typo in the .dat extension. int dotPosition = destination.lastIndexOf("."); - if ((dotPosition != -1) and (dotPosition >= length(destination) - 4)) - destination.chop(length(destination) - dotPosition); + if ((dotPosition != -1) and (dotPosition >= countof(destination) - 4)) + destination.chop(countof(destination) - dotPosition); destination += ".dat"; }