summaryrefslogtreecommitdiffstats
path: root/src/definition.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2009-12-22 16:03:24 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2009-12-22 16:03:24 (GMT)
commite32567534d95ff3960fa4dcad7733c18e1b39bc5 (patch)
treeed7891ebf8c1dbed877ba72eecb07d5da29b4978 /src/definition.cpp
parent6f2abee157d4310a8272ca0f748ce6b812ae7260 (diff)
downloadDoxygen-e32567534d95ff3960fa4dcad7733c18e1b39bc5.zip
Doxygen-e32567534d95ff3960fa4dcad7733c18e1b39bc5.tar.gz
Doxygen-e32567534d95ff3960fa4dcad7733c18e1b39bc5.tar.bz2
Release-1.6.1-20091222
Diffstat (limited to 'src/definition.cpp')
-rw-r--r--src/definition.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index fb20434..e778edd 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -600,7 +600,11 @@ static bool readCodeFragment(const char *fileName,
}
// copy until end of line
result+=c;
- if (c==':') result+=cn;
+ if (c==':')
+ {
+ result+=cn;
+ if (cn=='\n') lineNr++;
+ }
startLine=lineNr;
const int maxLineLength=4096;
char lineStr[maxLineLength];
@@ -617,9 +621,10 @@ static bool readCodeFragment(const char *fileName,
{
size_read=qstrlen(p);
}
- else
+ else // nothing read
{
size_read=-1;
+ lineStr[0]='\0';
}
result+=lineStr;
} while (size_read == (maxLineLength-1));