Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
3ae5c0df
Commit
3ae5c0df
authored
13 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Patches
Plain Diff
Fix out-of-range condition for submatch.
parent
3cb90c6a
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/values/matchvector.cpp
+4
-4
4 additions, 4 deletions
libwccl/values/matchvector.cpp
with
4 additions
and
4 deletions
libwccl/values/matchvector.cpp
+
4
−
4
View file @
3ae5c0df
...
...
@@ -90,19 +90,19 @@ void MatchVector::append(const boost::shared_ptr<MatchData> &m)
}
const
boost
::
shared_ptr
<
const
Match
>
MatchVector
::
submatch
(
size_t
idx
)
const
{
if
(
idx
+
1
<
matches_
.
size
()
||
idx
==
0
)
{
if
(
(
idx
<
matches_
.
size
()
+
1
)
||
(
idx
==
0
)
)
{
return
matches_
[
idx
-
1
];
}
else
{
throw
Wccl
::
WcclError
(
"Match vector index out of range"
);
throw
Wccl
::
WcclError
(
"Match vector index out of range
.
"
);
}
}
const
boost
::
shared_ptr
<
Match
>&
MatchVector
::
submatch
(
size_t
idx
)
{
if
(
idx
+
1
<
matches_
.
size
()
||
idx
==
0
)
{
if
(
(
idx
<
matches_
.
size
()
+
1
)
||
(
idx
==
0
)
)
{
return
matches_
[
idx
-
1
];
}
else
{
throw
Wccl
::
WcclError
(
"Match vector index out of range"
);
throw
Wccl
::
WcclError
(
"Match vector index out of range
.
"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
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!
Save comment
Cancel
Please
register
or
sign in
to comment