Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
ee3bc823
Unverified
Commit
ee3bc823
authored
1 year ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
fix: permit trailing blank space in bonds block
parent
0ce7dbdb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/io/src/mol/sdf_reader.cc
+9
-3
9 additions, 3 deletions
modules/io/src/mol/sdf_reader.cc
with
9 additions
and
3 deletions
modules/io/src/mol/sdf_reader.cc
+
9
−
3
View file @
ee3bc823
...
...
@@ -253,9 +253,15 @@ void SDFReader::ParseAndAddBond(const String& line, int line_num,
LOG_TRACE
(
"line: ["
<<
line
<<
"]"
);
if
(
line
.
length
()
<
9
||
line
.
length
()
>
21
)
{
String
msg
=
"Bad bond line %d: Not correct number of characters on the"
" line: %i (should be between 9 and 21)"
;
throw
IOException
(
str
(
format
(
msg
)
%
line_num
%
line
.
length
()));
// Handle the case where we have trailing space characters
if
(
line
.
length
()
>
21
&&
boost
::
trim_copy
(
line
.
substr
(
21
))
==
""
)
{
LOG_ERROR
(
"Ignoring trailing space"
);
}
else
{
String
msg
=
"Bad bond line %d: Not correct number of characters on the"
" line: %i (should be between 9 and 21)"
;
throw
IOException
(
str
(
format
(
msg
)
%
line_num
%
line
.
length
()));
}
}
String
s_first_name
=
line
.
substr
(
0
,
3
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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