Browse Source

Fixed tmp string problem with gcc on freebsd 7

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/slim/trunk@123 7c53e7cc-98ea-0310-8f1f-a0b24da60408
sip 15 years ago
parent
commit
a0be8ec29d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      cfg.cpp

+ 1 - 2
cfg.cpp

@@ -214,8 +214,7 @@ int Cfg::absolutepos(const string& position, int max, int width) {
     int n = -1;
     n = position.find("%");
     if (n>0) { // X Position expressed in percentage
-        const char* tmp =  position.substr(0, n).c_str();
-        int result = (max*string2int(tmp)/100) - (width / 2);
+        int result = (max*string2int(position.substr(0, n).c_str())/100) - (width / 2);
         return result < 0 ? 0 : result ;
     } else { // Absolute X position
         return string2int(position.c_str());