diff options
Diffstat (limited to 'service/src/stlfile.c')
| -rw-r--r-- | service/src/stlfile.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/service/src/stlfile.c b/service/src/stlfile.c index 04e6727..2712f08 100644 --- a/service/src/stlfile.c +++ b/service/src/stlfile.c @@ -270,8 +270,7 @@ parse_file_bin(struct parseinfo *info, char *buf, size_t len) memcpy(info->header, buf, 80); - if (*buf == '#' && strlen(buf + 1)) - info->solidname = checkp(strdup(buf + 1)); + info->solidname = checkp(strndup(buf + (*buf == '#'), 80)); bp = buf + 80; @@ -343,8 +342,6 @@ parse_file(struct parseinfo *info, char *buf, size_t len, char **modelname) : parse_file_bin(info, buf, len); if (status == FAIL) return FAIL; - if (!info->solidname) info->solidname = checkp(strdup("")); - info->modelname = *modelname; *modelname = NULL; |
