diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-02-21 17:56:25 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-02-21 17:56:25 +0000 |
| commit | 0650daaaac9c310117b8962647ad6e7b494edebe (patch) | |
| tree | 13a4db3ebcac60e6b0d6f97d6664443a543b6541 | |
| parent | a618179b9f84a96bffaa9355a5d8d570eb211374 (diff) | |
Fixed silly deletion in Demo.cxx
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | test/demo.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/demo.cxx b/test/demo.cxx index dd1f5ec11..7900df413 100644 --- a/test/demo.cxx +++ b/test/demo.cxx @@ -422,16 +422,17 @@ int load_the_menu(const char* fname) { #if defined ( __APPLE__ ) // mac os bundle menu detection: - char* pos = strrchr(fname,'/'); - if (!pos) return 0; - *pos='\0'; - pos = strrchr(fname,'/'); - if (!pos) return 0; - strcpy(pos,"/Resources/demo.menu"); - fin = fopen(fname,"r"); - if (fin == NULL) + char* pos = strrchr(fname,'/'); + if (!pos) return 0; + *pos='\0'; + pos = strrchr(fname,'/'); + if (!pos) return 0; + strcpy(pos,"/Resources/demo.menu"); + fin = fopen(fname,"r"); #endif } + // if "fin" is still NULL, we will read the menu from the string array in the + // beginning of the file. for (;;) { if (fin) { if (fgets(line,256,fin) == NULL) break; |
