Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
6d316cc7
Commit
6d316cc7
authored
Dec 10, 2003
by
bigben
Browse files
fixes a infinite loop in the search function.
parent
31d87e5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/macosx/playlist.m
View file @
6d316cc7
...
...
@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin
*****************************************************************************
* Copyright (C) 2002-2003 VideoLAN
* $Id: playlist.m,v 1.4
6
2003/1
1/2
0
0
2:
39:09 hartma
n Exp $
* $Id: playlist.m,v 1.4
7
2003/1
2/1
0
1
2:
57:12 bigbe
n Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
...
...
@@ -265,7 +265,7 @@
-
(
IBAction
)
searchItem
:(
id
)
sender
{
int
i_current
=
0
;
int
i_current
=
-
1
;
NSString
*
o_current_name
;
NSString
*
o_current_author
;
...
...
@@ -280,15 +280,17 @@
if
([
o_table_view
selectedRow
]
==
[
o_table_view
numberOfRows
]
-
1
)
{
i_current
=
0
;
i_current
=
-
1
;
}
else
{
i_current
=
[
o_table_view
selectedRow
]
+
1
;
i_current
=
[
o_table_view
selectedRow
];
}
while
(
i_current
!=
[
o_table_view
selectedRow
])
do
{
i_current
++
;
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
o_current_name
=
[
NSString
stringWithUTF8String
:
p_playlist
->
pp_items
[
i_current
]
->
psz_name
];
...
...
@@ -304,15 +306,12 @@
[
o_table_view
scrollRowToVisible
:
i_current
];
break
;
}
if
(
i_current
==
[
o_table_view
numberOfRows
]
-
1
)
{
i_current
=
0
;
}
else
if
(
i_current
==
[
o_table_view
numberOfRows
]
-
1
)
{
i_current
++
;
i_current
=
-
1
;
}
}
while
(
i_current
!=
[
o_table_view
selectedRow
]);
vlc_object_release
(
p_playlist
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment