Skip to content

Commit

Permalink
修正文件路径为空问题
Browse files Browse the repository at this point in the history
  • Loading branch information
JuncoJet committed Dec 25, 2017
1 parent eced2ef commit 487f7ca
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 5 deletions.
Binary file modified Release/lantern.dll
Binary file not shown.
Binary file modified Release/lantern.exp
Binary file not shown.
Binary file modified Release/lantern.lib
Binary file not shown.
Binary file modified Release/lantern.zip
Binary file not shown.
Binary file modified Release/lantern1.07.zip
Binary file not shown.
Binary file modified lantern.suo
Binary file not shown.
10 changes: 5 additions & 5 deletions lantern/lantern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ void dbg(char *s){
}
DWORD WINAPI ThreadProc(LPVOID lpParam){
char ver[VERSIZE];
int enable=GetPrivateProfileInt(app,"ENABLE",1,filepath);
if(!enable)
return 0;
else if(enable==1)
enable=-1;
GetModuleFileName(hMod,filepath,MAX_PATH);
for(int i=strlen(filepath);i>0;i--){
if(filepath[i]=='\\'){
Expand All @@ -40,6 +35,11 @@ DWORD WINAPI ThreadProc(LPVOID lpParam){
break;
}
}
int enable=GetPrivateProfileInt(app,"ENABLE",1,filepath);
if(!enable)
return 0;
else if(enable==1)
enable=-1;
GetPrivateProfileString(app,"VERSION",v[VSIZE-1],ver,VERSIZE,filepath);
if(!strlen(ver)){
return 0;//配置文件中没有版本号退出线程
Expand Down

0 comments on commit 487f7ca

Please sign in to comment.