forked from github/server
Abfangen fehlerhafter Messages im Code.
This commit is contained in:
parent
d2f242122d
commit
9ecf16f2e0
|
@ -12,6 +12,7 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "translation.h"
|
#include "translation.h"
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
/* libc includes */
|
/* libc includes */
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -308,24 +309,26 @@ parse_int(opstack ** stack, const char * in)
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
parse(opstack ** stack, const char* in, const void * userdata)
|
parse(opstack ** stack, const char* inn, const void * userdata)
|
||||||
{
|
{
|
||||||
while (*in) {
|
const char * b = inn;
|
||||||
switch (*in) {
|
while (*b) {
|
||||||
|
switch (*b) {
|
||||||
case '"':
|
case '"':
|
||||||
return parse_string(stack, ++in, userdata);
|
return parse_string(stack, ++b, userdata);
|
||||||
break;
|
break;
|
||||||
case '$':
|
case '$':
|
||||||
return parse_symbol(stack, ++in, userdata);
|
return parse_symbol(stack, ++b, userdata);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (isdigit(*in) || *in=='-' || *in=='+') {
|
if (isdigit(*b) || *b=='-' || *b=='+') {
|
||||||
return parse_int(stack, in);
|
return parse_int(stack, b);
|
||||||
}
|
}
|
||||||
else ++in;
|
else ++b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return in;
|
log_error(("could not parse %s. Missing \"\"?", inn));
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
Loading…
Reference in New Issue