From f90f5ee7847dc05203b666c606f9a17dc3957203 Mon Sep 17 00:00:00 2001 From: lltcggie Date: Thu, 4 Jun 2015 02:38:00 +0900 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E5=8A=9B=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E5=90=8D=E3=81=AB=E6=8B=A1=E5=BC=B5=E5=AD=90=E3=81=AE?= =?UTF-8?q?=E7=84=A1=E3=81=84=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92?= =?UTF-8?q?=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=9F=E5=A0=B4=E5=90=88=E3=80=81?= =?UTF-8?q?=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA=E7=94=9F=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waifu2x-caffe-gui/Source.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waifu2x-caffe-gui/Source.cpp b/waifu2x-caffe-gui/Source.cpp index 60ec802..6399df7 100644 --- a/waifu2x-caffe-gui/Source.cpp +++ b/waifu2x-caffe-gui/Source.cpp @@ -766,7 +766,8 @@ public: std::string outputFileName = szTmp; const auto tailDot = outputFileName.find_last_of('.'); - outputFileName.erase(tailDot, outputFileName.length()); + if (tailDot != outputFileName.npos) + outputFileName.erase(tailDot, outputFileName.length()); const std::string addstr(AddName()); autoSetAddName = addstr;