]> git.sesse.net Git - vlc/commitdiff
* interface.cpp: fixed a stack corruption which caused a segfault in the
authorCyril Deguet <asmax@videolan.org>
Fri, 22 Aug 2003 08:06:25 +0000 (08:06 +0000)
committerCyril Deguet <asmax@videolan.org>
Fri, 22 Aug 2003 08:06:25 +0000 (08:06 +0000)
  wxwindows plugin (in UpdateAcceleratorTable, the table
  wxAcceleratorEntry entries[6] was filled with _seven_ values ;-)
  I guess it didn't happen with all compilers because of the way
  variables are stored on the stack)
* wxwindows.h: removed a warning

modules/gui/wxwindows/interface.cpp
modules/gui/wxwindows/wxwindows.h

index a3361d3479f5aa4d3d4b2460ff13620b70f19ebd..6d104ba468f912e1cd0e11be5f853972eaec5125 100644 (file)
@@ -2,7 +2,7 @@
  * interface.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: interface.cpp,v 1.55 2003/08/14 19:25:56 sigmunau Exp $
+ * $Id: interface.cpp,v 1.56 2003/08/22 08:06:25 asmax Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -363,7 +363,7 @@ void Interface::CreateOurToolBar()
                          * version because we don't include wx.rc */
 
     wxToolBar *toolbar = CreateToolBar(
-        wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE );
+                                       wxTB_HORIZONTAL | wxTB_FLAT | wxTB_DOCKABLE );
 
     toolbar->SetToolBitmapSize( wxSize(TOOLBAR_BMP_WIDTH,TOOLBAR_BMP_HEIGHT) );
 
@@ -453,7 +453,7 @@ void Interface::CreateOurSlider()
 void Interface::UpdateAcceleratorTable()
 {
     /* Set some hotkeys */
-    wxAcceleratorEntry entries[6];
+    wxAcceleratorEntry entries[7];
     int i_key = config_GetInt( p_intf, "quit-key" );
     int i = 0;
     entries[i++].Set( ConvertHotkeyModifiers( i_key ), ConvertHotkey( i_key ),
@@ -477,7 +477,7 @@ void Interface::UpdateAcceleratorTable()
     entries[i++].Set( ConvertHotkeyModifiers( i_key ), ConvertHotkey( i_key ),
                     SlowStream_Event );
 
-    wxAcceleratorTable accel( 6, entries );
+    wxAcceleratorTable accel( 7, entries );
 
     if( !accel.Ok() )
         msg_Err( p_intf, "invalid accelerator table" );
index f5131598aaae4391b197996083c3c7dd22160dfe..47f52cb9e4f8740ab077d45c5218219f81c513be 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.55 2003/08/20 19:17:29 adn Exp $
+ * $Id: wxwindows.h,v 1.56 2003/08/22 08:06:25 asmax Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -762,8 +762,7 @@ static inline int ConvertHotkey( int i_hotkey )
         case KEY_PAGEDOWN: return WXK_NEXT;
         case KEY_TAB: return WXK_TAB;
         case KEY_BACKSPACE: return WXK_BACK;
-        default:
-            return 0;
         }
     }
+    return 0;
 }