Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
a2bfa610
Commit
a2bfa610
authored
Sep 28, 2009
by
Robert Loehning
Browse files
Trk: Added some error checking.
parent
dcc60fb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/shared/trk/launcher.cpp
View file @
a2bfa610
...
...
@@ -280,7 +280,7 @@ void Launcher::handleResult(const TrkResult &result)
void
Launcher
::
handleTrkVersion
(
const
TrkResult
&
result
)
{
if
(
result
.
data
.
size
()
<
5
)
if
(
result
.
errorCode
()
||
result
.
data
.
size
()
<
5
)
return
;
const
int
trkMajor
=
result
.
data
.
at
(
1
);
const
int
trkMinor
=
result
.
data
.
at
(
2
);
...
...
@@ -353,6 +353,8 @@ void Launcher::handleFileCreated(const TrkResult &result)
void
Launcher
::
handleCpuType
(
const
TrkResult
&
result
)
{
logMessage
(
"HANDLE CPU TYPE: "
+
result
.
toString
());
if
(
result
.
errorCode
()
||
result
.
data
.
size
()
<
7
)
return
;
//---TRK------------------------------------------------------
// Command: 0x80 Acknowledge
// Error: 0x00
...
...
@@ -402,6 +404,8 @@ void Launcher::handleWaitForFinished(const TrkResult &result)
void
Launcher
::
handleSupportMask
(
const
TrkResult
&
result
)
{
if
(
result
.
errorCode
()
||
result
.
data
.
size
()
<
32
)
return
;
const
char
*
data
=
result
.
data
.
data
()
+
1
;
QByteArray
str
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment