mirror of
https://github.com/RTimothyEdwards/netgen.git
synced 2026-08-22 14:07:07 +02:00
Corrected an issue in which netgen would attempt to find a file
from a ".include" line by trying alternate extensions. This should be discouraged, as it happened that a file included "name.defparams", a file that didn't exist, and instead of calling out the missing file, it recast it to "name.spice" and caused it to drop into an infinite loop. Oops.
This commit is contained in:
+8
-5
@@ -1941,12 +1941,15 @@ void IncludeSpice(char *fname, int parent, struct cellstack **CellStackPtr,
|
||||
if ((filenum = OpenParseFile(fname, parent)) < 0) {
|
||||
|
||||
/* If that fails, see if a standard SPICE extension */
|
||||
/* helps. But really, we're getting desperate at this */
|
||||
/* point. */
|
||||
/* helps, if the file didn't have an extension. But */
|
||||
/* really, we're getting desperate at this point. */
|
||||
|
||||
SetExtension(name, fname, SPICE_EXTENSION);
|
||||
if ((filenum = OpenParseFile(name, parent)) < 0) {
|
||||
Fprintf(stderr,"Error in SPICE file read: No file %s\n",name);
|
||||
if (strchr(fname, '.') == NULL) {
|
||||
SetExtension(name, fname, SPICE_EXTENSION);
|
||||
filenum = OpenParseFile(name, parent);
|
||||
}
|
||||
if (filenum < 0) {
|
||||
Fprintf(stderr,"Error in SPICE file include: No file %s\n",name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user