If given ".." as argument, the result would not be (workdir)+"..". Instead, it would resolve the relative .. directory and assume it is the working directory, ending up one level too high in the tree.
Now F_PrependWorkDir() does exactly what it promises, i.e., prepends Dir_CurrentPath(). The path is then cleaned to remove ".." and other directives.
Fixed errors with F_PrependWorkDir()
If given ".." as argument, the result would not be (workdir)+"..". Instead,
it would resolve the relative .. directory and assume it is the
working directory, ending up one level too high in the tree.
Now F_PrependWorkDir() does exactly what it promises, i.e.,
prepends Dir_CurrentPath(). The path is then cleaned to remove
".." and other directives.
Fixed a buffer overflow in M_StripRight().