fix segfault in pair style hybrid/scaled due to unallocated data

This commit is contained in:
Axel Kohlmeyer
2022-07-12 00:14:26 -04:00
parent f0d8ced6ff
commit 4cb38038c8

View File

@ -276,6 +276,8 @@ void PairHybridScaled::settings(int narg, char **arg)
// allocate list of sub-styles as big as possibly needed if no extra args
styles = new Pair *[narg];
cutmax_style = new double[narg];
memset(cutmax_style, 0.0, narg*sizeof(double));
keywords = new char *[narg];
multiple = new int[narg];