From ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 30 Aug 2017 22:51:23 +0300 Subject: Move some variables to better scope. --- src/net/eathena/buyingstorerecv.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/net/eathena/buyingstorerecv.cpp') diff --git a/src/net/eathena/buyingstorerecv.cpp b/src/net/eathena/buyingstorerecv.cpp index 55c1624f9..bf5d2032b 100644 --- a/src/net/eathena/buyingstorerecv.cpp +++ b/src/net/eathena/buyingstorerecv.cpp @@ -94,10 +94,15 @@ void BuyingStoreRecv::processBuyingStoreOwnItems(Net::MessageIn &msg) void BuyingStoreRecv::processBuyingStoreShowBoard(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("owner id"); - const std::string shopName = msg.readString(80, "shop name"); Being *const dstBeing = actorManager->findBeing(id); if (dstBeing != nullptr) - dstBeing->setBuyBoard(shopName); + { + dstBeing->setBuyBoard(msg.readString(80, "shop name")); + } + else + { + msg.readString(80, "shop name"); + } } void BuyingStoreRecv::processBuyingStoreHideBoard(Net::MessageIn &msg) -- cgit v1.2.3-70-g09d2