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);
|
||||
switch (model) {
|
||||
case 0:
|
||||
dc->model = "Xen";
|
||||
dc->model = strdup("Xen");
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
dc->model = "Xeo";
|
||||
dc->model = strdup("Xeo");
|
||||
break;
|
||||
case 4:
|
||||
dc->model = "Lynx";
|
||||
dc->model = strdup("Lynx");
|
||||
break;
|
||||
default:
|
||||
dc->model = "Liquivision";
|
||||
dc->model = strdup("Liquivision");
|
||||
break;
|
||||
}
|
||||
ptr++;
|
||||
|
|
Loading…
Add table
Reference in a new issue