protoclbr: fixed an issue caused by an unitialized variable.

Wed, 09 Sep 2020 18:02:39 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 09 Sep 2020 18:02:39 +0200
changeset 7695
032a0586a349
parent 7694
c0d5f539a5a2
child 7696
f7e2cb3fc9d4

protoclbr: fixed an issue caused by an unitialized variable.

eric6/Utilities/ClassBrowsers/protoclbr.py file | annotate | diff | comparison | revisions
diff -r c0d5f539a5a2 -r 032a0586a349 eric6/Utilities/ClassBrowsers/protoclbr.py
--- a/eric6/Utilities/ClassBrowsers/protoclbr.py	Sun Sep 06 12:41:19 2020 +0200
+++ b/eric6/Utilities/ClassBrowsers/protoclbr.py	Wed Sep 09 18:02:39 2020 +0200
@@ -314,15 +314,15 @@
             # we found a message definition
             thisindent = indent
             indent += 1
+            lineno = lineno + src.count('\n', last_lineno_pos, start)
+            last_lineno_pos = start
+            message_name = m.group("MessageName")
             # close all messages/services indented at least as much
             while classstack and classstack[-1][1] >= thisindent:
                 if classstack[-1][0] is not None:
                     # record the end line
                     classstack[-1][0].setEndLine(lineno - 1)
                 del classstack[-1]
-            lineno = lineno + src.count('\n', last_lineno_pos, start)
-            last_lineno_pos = start
-            message_name = m.group("MessageName")
             # remember this message
             cur_class = Message(module, message_name, file, lineno)
             if not classstack:

eric ide

mercurial