GET_RESPONSE_DATA fix

This commit is contained in:
HanzZ 2012-03-16 10:37:40 +01:00
parent c4e327423f
commit 19ebf447d6

View file

@ -36,7 +36,7 @@ using namespace Transport;
class SpectrumNetworkPlugin;
#define GET_RESPONSE_DATA(RESP, DATA) (RESP.find(DATA) != std::string::npos ? RESP.substr(RESP.find(DATA) + strlen(DATA) + 1) : "");
#define GET_RESPONSE_DATA(RESP, DATA) ((RESP.find(std::string(DATA) + " ") != std::string::npos) ? RESP.substr(RESP.find(DATA) + strlen(DATA) + 1) : "");
#define GET_PROPERTY(VAR, OBJ, WHICH, PROP) std::string VAR = sk->send_command(std::string("GET ") + OBJ + " " + WHICH + " " + PROP); \
VAR = GET_RESPONSE_DATA(VAR, PROP);