Skip to content
Snippets Groups Projects
Commit ba9e2f49 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Use known length instead instead of string terminator scan.

parent 2c52a42b
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,7 @@ int setBaseTime(const char *timeunits, taxis_t *taxis)
}
size_t pos = 0;
while ( ! isspace(tu[pos]) && tu[pos] != 0 ) ++pos;
while ( pos < len && !isspace(tu[pos]) ) ++pos;
if ( tu[pos] )
{
while ( isspace(tu[pos]) ) ++pos;
......@@ -224,7 +224,7 @@ int setBaseTime(const char *timeunits, taxis_t *taxis)
if ( str_is_equal(tu+pos, "since") )
timetype = TAXIS_RELATIVE;
while ( ! isspace(tu[pos]) && tu[pos] != 0 ) ++pos;
while ( pos < len && !isspace(tu[pos]) ) ++pos;
if ( tu[pos] )
{
while ( isspace(tu[pos]) ) ++pos;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment