From: Steven K. H. W. <st...@ze...> - 2007-04-24 14:48:46
|
Hi, Not sure if this has been reported already or not. I was looking through the latest Fluxbox source code today and stumbled upon this in main.cc, revision 4869, line 194: if (arg == "-rc") { // look for alternative rc file to use if ((++i) >= argc) { ... // Error handling stuff } rc_file = arg; } ... I suspect 'rc_file' is getting set to '-rc' instead of the argument following '-rc'. I think "rc_file = arg;" should actually be "rc_file = argv[i];" or something similar. I ran it through gdb and it seems to confirm my guess: (gdb) run -rc hehe Starting program: /home/glutinous/blackbox/fluxbox-svn/fluxbox/src/fluxbox -rc hehe [Thread debugging using libthread_db enabled] [New Thread -1213405488 (LWP 12218)] FbTk::FbString: setup converts for local codeset = UTF-8 [Switching to Thread -1213405488 (LWP 12218)] Breakpoint 1, main (argc=3, argv=0xbfdaee04) at main.cc:203 203 rc_file = arg; (gdb) print arg.c_str() $2 = 0x81e5d84 "-rc" (gdb) break main.cc:281 Breakpoint 2 at 0x8081bce: file main.cc, line 281. (gdb) continue Continuing. Breakpoint 2, main (argc=3, argv=0xbfdaee04) at main.cc:282 282 fluxbox.reset(new Fluxbox(argc, argv, session_display.c_str(), rc_file.c_str())); (gdb) print rc_file.c_str() $3 = 0x81e5d84 "-rc" (gdb) The same problem will occur for handling '-display' too. Possibly some other arguments too, but I don't have time to check them all. Need to sleep. :) I have not actually run fluxbox and tried testing '-rc' to confirm my theory, as I am still in the process of evaluating a few things before I can run it in my home directory. So maybe I am wrong. Let me know if you think this is a genuine bug! -Steven |