From c9bb53e1091c38c9b137f0e03e38241808d89e79 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 20 Jun 2023 19:14:47 +0100 Subject: [PATCH] ISstream: Corrected parsing of variables --- applications/test/dictionary/Test-dictionary.C | 6 +++--- src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/test/dictionary/Test-dictionary.C b/applications/test/dictionary/Test-dictionary.C index 82ed0f2f38..da970045f4 100644 --- a/applications/test/dictionary/Test-dictionary.C +++ b/applications/test/dictionary/Test-dictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,9 +48,9 @@ int main(int argc, char *argv[]) { dictionary dict; - dict.add("aaOPENMPIcc", 1); + dict.add("aaOpenFOAMcc", 1); - string s("DDD${aa${WM_MPLIB}cc}EEE"); + string s("DDD${aa${WM_PROJECT}cc}EEE"); stringOps::inplaceExpand(s, dict, true, false); Info<< "variable expansion:" << s << endl; } diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C index 938d37f9a9..19dbd1e94a 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C +++ b/src/OpenFOAM/db/IOstreams/Sstreams/ISstream.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -570,7 +570,7 @@ Foam::Istream& Foam::ISstream::readVariable(string& str) { buf_.append(c); - int blockCount = 0; + int blockCount = 1; if (c == token::BEGIN_BLOCK) {