Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix runtime errors in debug mode
  • Loading branch information
martyone committed Apr 9, 2013
1 parent f793326 commit a4fb6d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion libssu/sandbox.cpp
Expand Up @@ -147,7 +147,6 @@ bool Sandbox::addWorldFiles(const QString &directory, QDir::Filters filters,
Q_ASSERT(!directory.contains("/./") && !directory.endsWith("/.")
&& !directory.contains("/../") && !directory.endsWith("/..")
&& !directory.contains("//"));
Q_ASSERT_X(!(m_scopes & ChildProcesses), Q_FUNC_INFO, "Unimplemented case!");

if (!prepare()){
return false;
Expand Down
2 changes: 1 addition & 1 deletion libssu/ssuvariables.cpp
Expand Up @@ -89,7 +89,7 @@ QString SsuVariables::resolveVariable(QString variable, QHash<QString, QString>

// find the operator who's after your colon
QChar op;
if (variable.length() >= magic +1)
if (variable.length() > magic +1)
op = variable.at(magic + 1);

switch(op.toAscii()){
Expand Down
4 changes: 3 additions & 1 deletion tests/testutils/process.cpp
Expand Up @@ -42,7 +42,9 @@ bool Process::hasError(){
}

QString Process::fmtErrorMessage(){
Q_ASSERT(hasError());
if (!hasError()){
return QString();
}

QStringList reasons;
if (m_timedOut){
Expand Down
3 changes: 3 additions & 0 deletions tests/ut_rndssucli/rndssuclitest.h
Expand Up @@ -15,6 +15,9 @@ class Sandbox;
class RndSsuCliTest: public QObject {
Q_OBJECT

public:
RndSsuCliTest(): m_sandbox(0) {}

private slots:
void init();
void cleanup();
Expand Down

0 comments on commit a4fb6d3

Please sign in to comment.