X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fbackend%2Fmysql%2Fbackend.inc;h=87e1d2d744bd09297fafed0b8050e5eb81d66d78;hb=b17a1e9bc746b7eb0549dfd8dff61e132c9de828;hp=bdc85152631c56af2cebf295cff829752571a5da;hpb=c0704469111eb3976fe271df2899abc7f2934380;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index bdc8515..87e1d2d 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -363,6 +363,11 @@ function setSynapse($params){ $dst=$params['dst']; $weight=$params['weight']; + // weight could be only positive + if ( $weight < 0) { + return false; + } + // if already exists $q="select count(src) from neurons where dst ='$dst' and src = '$src'"; $set=$db->query($q);