--- a/scripts/xdg-mime.in 2017-10-11 00:05:11.535101057 +1000 +++ b/scripts/xdg-mime.in 2017-10-11 00:05:56.255847687 +1000 @@ -171,7 +171,7 @@ blanks++ suppress=1 } else if (associations && index($0, prefix) == 1) { - value=substr($0, length(prefix) + 1, length) + value=substr($0, length(prefix) + 1, length()) split(value, apps, ";") value=application ";" count=0 @@ -369,7 +369,7 @@ } else if (index($0, "[") == 1) { indefault=0 } else if (!found && indefault && index($0, prefix) == 1) { - print substr($0, length(prefix) +1, length) + print substr($0, length(prefix) +1, length()) found=1 } }