projects
/
profile
/
ivi
/
rygel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43f00a1
)
core: Clamp the stop between start and length
author
Zeeshan Ali (Khattak)
<zeeshanak@gnome.org>
Thu, 1 Oct 2009 21:49:49 +0000
(
00:49
+0300)
committer
Zeeshan Ali (Khattak)
<zeeshanak@gnome.org>
Thu, 1 Oct 2009 21:49:49 +0000
(
00:49
+0300)
Instead of setting stop to be the maximum of stop and length, it should
instead be clamped between start and length.
src/rygel/rygel-http-seek.vala
patch
|
blob
|
history
diff --git
a/src/rygel/rygel-http-seek.vala
b/src/rygel/rygel-http-seek.vala
index
fd6977a
..
58959e4
100644
(file)
--- a/
src/rygel/rygel-http-seek.vala
+++ b/
src/rygel/rygel-http-seek.vala
@@
-164,11
+164,7
@@
internal class Rygel.HTTPSeek : GLib.Object {
}
if (length > 0) {
- if (stop >= 0.0) {
- stop = double.max (stop, (double) length - 1);
- } else {
- stop = (double) length - 1;
- }
+ stop = stop.clamp (start + 1, (double) length - 1);
}
value += start.to_string () + "-";