mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Avoid reading an uninitialized variable when adding new cylinders
If mbar = 0 then *p would not be set, but the variable was then used in the calling function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3a37554f35
commit
63c0c7921b
1 changed files with 2 additions and 0 deletions
|
|
@ -102,6 +102,8 @@ static void convert_volume_pressure(int ml, int mbar, double *v, double *p)
|
||||||
else
|
else
|
||||||
pressure = mbar / 1000.0;
|
pressure = mbar / 1000.0;
|
||||||
*p = pressure;
|
*p = pressure;
|
||||||
|
} else {
|
||||||
|
*p = 0;
|
||||||
}
|
}
|
||||||
*v = volume;
|
*v = volume;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue