*/}}
Browse Source

Stack fixes

YimingWu 2 months ago
parent
commit
eb741ad75b
2 changed files with 4 additions and 2 deletions
  1. 3 2
      la_kernel.c
  2. 1 0
      la_util.c

+ 3 - 2
la_kernel.c

@@ -531,7 +531,7 @@ void la_glDebugOutput(GLenum source, GLenum type, unsigned int id,
 //#endif
 }
 
-void la_SetCurrentGLContextDebug(){
+static void la_SetCurrentGLContextDebug(){
 //#ifndef LAGUI_ANDROID
     int force=MAIN.InitArgs.GLDebug;
     if(MAIN.EnableGLDebug || force){ glEnable(GL_DEBUG_OUTPUT); }else{ glDisable(GL_DEBUG_OUTPUT); }
@@ -8246,12 +8246,13 @@ int laCopyToClipboard(unsigned char * text){
     EmptyClipboard();
     size_t allocsize = strlen(text) + 1;
     HGLOBAL hg = GlobalAlloc(GMEM_MOVEABLE, allocsize);
-    if (!hg){ CloseClipboard(); return; }
+    if (!hg){ CloseClipboard(); return 0; }
     memcpy(GlobalLock(hg), text, allocsize);
     GlobalUnlock(hg);
     SetClipboardData(CF_TEXT, hg);
     CloseClipboard();
     GlobalFree(hg);
+    return 1;
 #endif
     return 0;
 }

+ 1 - 0
la_util.c

@@ -2371,6 +2371,7 @@ int laEnsureDir(const char *dir) {
     if(stat(dir, &statbuf) != 0){ return 0; }
     return S_ISDIR(statbuf.st_mode);
 #endif
+    return 0;
 }
 
 #ifdef LAGUI_ANDROID