Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
2b67b6b8
Commit
2b67b6b8
authored
Apr 01, 2020
by
antirez
Browse files
LCS: fix emission of last range starting at index 0.
parent
420aac72
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_string.c
View file @
2b67b6b8
...
@@ -595,7 +595,6 @@ void lcsCommand(client *c) {
...
@@ -595,7 +595,6 @@ void lcsCommand(client *c) {
arange_end
=
i
-
1
;
arange_end
=
i
-
1
;
brange_start
=
j
-
1
;
brange_start
=
j
-
1
;
brange_end
=
j
-
1
;
brange_end
=
j
-
1
;
if
(
i
==
0
||
j
==
0
)
emit_range
=
1
;
}
else
{
}
else
{
/* Let's see if we can extend the range backward since
/* Let's see if we can extend the range backward since
* it is contiguous. */
* it is contiguous. */
...
@@ -606,6 +605,7 @@ void lcsCommand(client *c) {
...
@@ -606,6 +605,7 @@ void lcsCommand(client *c) {
emit_range
=
1
;
emit_range
=
1
;
}
}
}
}
if
(
arange_start
==
0
||
brange_start
==
0
)
emit_range
=
1
;
/* Emit the current range if needed. */
/* Emit the current range if needed. */
if
(
emit_range
)
{
if
(
emit_range
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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