From 7cbd688374a5ea42d80b9be264367ae504cec3a3 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 18 Oct 2021 07:26:08 +0200 Subject: [PATCH] Update write-quote.ps1 --- Scripts/write-quote.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Scripts/write-quote.ps1 b/Scripts/write-quote.ps1 index 90d95053..2f78e08c 100755 --- a/Scripts/write-quote.ps1 +++ b/Scripts/write-quote.ps1 @@ -13,10 +13,9 @@ try { $Table = import-csv "$PSScriptRoot/../Data/quotes.csv" - $NumRows = $Table.count $Generator = New-Object System.Random - $Index = [int]$Generator.next(0,$NumRows - 1) + $Index = [int]$Generator.next(0, $Table.Count - 1) $Quote = $Table[$Index].Quote $Author = $Table[$Index].Author