Forgot to initialise the iterator index properly.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4938 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 2e14bcf..8606dcc 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -296,7 +296,7 @@
{
RRModePtr mode;
- for (int i;i < output->numModes;i++) {
+ for (int i = 0;i < output->numModes;i++) {
if ((output->modes[i]->mode.width == width) &&
(output->modes[i]->mode.height == height))
return output->modes[i];