mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix Liquivision import crash
When we detect a redundant DC we free the memory reserved for the model. Thus we need to malloc that memory here. Fixes #1002 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ce373db951
commit
520f505d20
1 changed files with 4 additions and 4 deletions
|
@ -114,17 +114,17 @@ static void parse_dives (int log_version, const unsigned char *buf, unsigned int
|
||||||
model = *(buf + ptr);
|
model = *(buf + ptr);
|
||||||
switch (model) {
|
switch (model) {
|
||||||
case 0:
|
case 0:
|
||||||
dc->model = "Xen";
|
dc->model = strdup("Xen");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
dc->model = "Xeo";
|
dc->model = strdup("Xeo");
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
dc->model = "Lynx";
|
dc->model = strdup("Lynx");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dc->model = "Liquivision";
|
dc->model = strdup("Liquivision");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ptr++;
|
ptr++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue