1
0
Fork 0

Frederic Bouvier:

Well, I found a bug in VpfTile that prevents the function getTileSubdir
to return the correct value.

In that case getTileSubdir was returning the content of a local
variable (subdir) that is destroyed before used outside. Usually,
it generates a segfault with MSVC but here, the returned string
was "". The patch returns the value of the string and tgpvf is
going well so far.
This commit is contained in:
curt 2002-10-07 15:36:26 +00:00
parent 43a271c396
commit fbb232280e
2 changed files with 6 additions and 3 deletions
src/Lib/vpf

View file

@ -34,7 +34,7 @@ VpfTile::~VpfTile ()
freeTable(_fbr);
}
const char *
string
VpfTile::getTileSubdir () const
{
const VpfTable &aft = getAFT();
@ -46,7 +46,7 @@ VpfTile::getTileSubdir () const
else
subdir[i] = tolower(subdir[i]);
}
return subdir.c_str();
return subdir;
}
const VpfRectangle

View file

@ -9,6 +9,9 @@
#include <string>
using std::string;
class VpfTable;
@ -49,7 +52,7 @@ public:
*
* @return The subdirectory for a tile.
*/
virtual const char * getTileSubdir () const;
virtual string getTileSubdir () const;
/**